Adding Guardrails with Validating Admission Policies

As I’m digging deeper into Kubernetes, I’m starting to appreciate that it is better to have guardrails built into the system rather than relying on human caution.

A feature that stood out for me recently is “Validating Admission Policies”. From what I understand, these policies let you define rules that Kubernetes will check before accepting a request. So instead of reacting after something goes wrong, you can actually prevent risky changes from being applied in the first place.

For example, you could:

  • Block deletion of critical namespaces like kube-system

  • Enforce that containers must have resource limits set

  • Prevent use of the latest image tag

  • Restrict privileged containers


In comparison to RBAC, which most are familiar with (Roles, ClusterRoles, RoleBindings, ClusterRoleBindings), RBAC controls who can do what, while admission policies control what is allowed to happen regardless of who initiates it.