ACP supports Kubernetes Pod Security Admission (PSA) and Kyverno Policy to help enforce security standards for Pods running in your clusters.
Refer to the official Kubernetes documentation: Pod Security Admission
Pod Security Admission (PSA) is a Kubernetes admission controller that enforces security policies at the namespace level by validating Pod specifications against predefined standards.
PSA defines three modes to control how policy violations are handled:
| Mode | Behavior | Use Case |
|---|---|---|
| Enforce | Denies creation/modification of non-compliant Pods. | Production environments requiring strict security enforcement. |
| Audit | Allows Pod creation but logs violations in audit logs. | Monitoring and analyzing security incidents without blocking workloads. |
| Warn | Allows Pod creation but returns client warnings for violations. | Testing environments or transitional phases for policy adjustments. |
Key Notes:
PSA defines three security standards to restrict Pod privileges:
| Standard | Description | Key Restrictions |
|---|---|---|
| Privileged | Unrestricted access. Suitable for trusted workloads (e.g., system components). | No validation of securityContext fields. |
| Baseline | Minimal restrictions to prevent known privilege escalations. | Blocks hostNetwork, hostPID, privileged containers, and unrestricted hostPath volumes. |
| Restricted | Strictest policy enforcing security best practices. | Requires: - runAsNonRoot: true - seccompProfile.type: RuntimeDefault - Dropped Linux capabilities. |
Apply labels to namespaces to define PSA policies.
YAML file example
CLI command
Exempt specific users, namespaces, or runtime classes from PSA checks.
Example Configuration:
ACP provides several samples to create the Kyverno policies for Pod security. The samples includes:
The Restricted policy is not equal to the Kubernetes Pod Security Admission 'restricted' standard. You may need to change your pod security configuration if you want to use the kyverno Restricted policy instead of Kubernetes Pod Security Admission 'restricted' standard.
namespace-resource-manage in ACP featuregate settings.Restricted), then click Try.Log in to the kubernetes cluster where you want to apply the security policy.
Run the following command to create a Kyverno Policy from a sample resource:
The sample resources available are: