liveBook · Manning

PodSecurityPolicy

As explained in Google Anthos in Action

PodSecurityPolicy is a deprecated Kubernetes API resource for enforcing security constraints on pods.

PodSecurityPolicy (PSP) is a deprecated Kubernetes API resource that enforced security constraints on deployed Pods. PSPs were intended to restrict dangerous configurations, including privileged containers and root execution. section 13.3.2

Treat PSPs as a legacy control with significant operational limitations:

  • Bindings depend on the Pod’s ServiceAccount or the submitting user, making policy behavior difficult to troubleshoot. section 13.3.2
  • PSPs cannot restrict the type of PersistentVolumeClaim, allowing a user to create a claim using HostPath. section 13.3.2
  • Fail-closed behavior requires every policy to exist before enabling PSPs across a cluster, preventing gradual rollout. section 13.3.2

Migration direction

Replace PSP-based security mechanisms with Gatekeeper policies; the Gatekeeper project provides policies designed specifically to replace PSPs. section 13.4.3

How Google Anthos in Action covers it

How deep it goes
Explains bindings, rollout behavior, and policy limitations, but stops short of a configuration tutorial.
Examples
Uses privileged containers, root execution, HostPath claims, and Gatekeeper migration as concrete security examples.
What it assumes
Assumes familiarity with Kubernetes clusters, Pods, ServiceAccounts, and cluster security administration.
What you can do after
Evaluate PSP limitations and plan migration to Gatekeeper policies.
How it connects
Connects PodSecurityPolicy with ServiceAccounts, admission controllers, Gatekeeper, Policy Controller, and PersistentVolumeClaims.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.