Menu

Pod Security Admission audit and warn do not enforce the policy
📰

Pod Security Admission audit and warn do not enforce the policy

DEV Community: kubernetes·OnaEiuspkz·14 days ago
#Y86DNbrL
#devtokubernetes#devto#dev#policy#security
Reading 0:00
15s threshold

Pod Security Admission audit and warn do not enforce the policy

Kubernetes Pod Security Admission can evaluate Pods against the Pod Security Standards. Its three modes, enforce , audit , and warn , are related but not interchangeable. A namespace with an audit label is not a namespace that blocks a privileged Pod.

The Kubernetes documentation says enforce rejects Pods that violate the selected policy. audit adds audit annotations and events while allowing the request, and warn returns a warning to the client while allowing the request. Both are useful for discovery and rollout. Neither becomes an admission denial by itself.

This distinction matters because operators often deploy a policy in warn mode, review the warnings during a change window, and then assume the policy remains active. It does not. If the enforce label is missing, empty, or set to a weaker level, the object can still be admitted.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.