DedSec Project

Kubernetes Admission Control, Policy-as-Code and Runtime Guardrails — DedSec Project

Kubernetes Admission Control, Policy-as-Code and Runtime Guardrails Deepen Kubernetes security by focusing on the control path between an API request and a running workload: admission…

Deepen Kubernetes security by focusing on the control path between an API request and a running workload: admission, mutation, validation, pod-security controls, policy engines and runtime drift.

Learning objectives

By the end of this module you should be able to:

Deep concepts

1. admission lifecycle

Kubernetes admission runs after authentication/authorization but before an API object is persisted. It is a policy enforcement point for resource configuration, not a replacement for runtime isolation, RBAC, image security, or continuous drift detection.

2. mutating versus validating admission

Mutating admission can add/default fields before validation; validating admission accepts or rejects the resulting object. Keep mutations predictable and observable because hidden changes make policy reasoning, debugging, and signed-manifest expectations harder.

3. Pod Security Standards

Pod Security Standards define baseline/restricted expectations for risky pod settings such as privilege, host namespaces, capabilities, volume types, and seccomp. Apply profiles according to workload need and manage narrow exceptions explicitly.

4. policy engines

Admission policy engines evaluate manifests against organization-specific rules. Version policies as code, test allow/deny cases in CI, use clear messages, scope rules carefully, and monitor exceptions so a temporary bypass does not become permanent architecture.

5. image provenance and allowlists

Admission can restrict registries, digests, signatures/attestations, or provenance according to deployment policy. Prefer immutable digests and verified provenance for high-assurance workloads rather than trusting a mutable image tag alone.

6. namespace and service-account context

The same manifest can have different risk depending on namespace labels, service account, secrets, network policy, quotas, and target environment. Admission decisions should include the context that actually determines workload authority.

7. runtime drift

Admission checks desired objects at creation/update time, but containers, nodes, credentials, external services, or manually changed infrastructure can drift afterward. Combine admission with runtime telemetry, configuration reconciliation, and periodic policy checks.

8. telemetry and exceptions

Record policy/version, object, namespace, user/service account, decision, violated rule, and exception identity. Exception workflows should require owner, reason, scope, and expiry, with dashboards showing which high-risk workloads are outside normal policy.

Authorized lab sequence

Knowledge checks

Answer these without looking at the notes:

Next modules

Recommended related modules: 024, 041, 075, 093, 097, 113. From the main menu, choose Search lessons to find related sections across the full guide.