Inferensys

Glossary

Admission Controller

A piece of code that intercepts requests to the Kubernetes API server after authentication and authorization, mutating or validating objects to enforce custom security policies before persistence.
Control room desk with laptops and a large orchestration network display.
KUBERNETES SECURITY

What is an Admission Controller?

An admission controller is a piece of code that intercepts authenticated and authorized requests to the Kubernetes API server before object persistence, enabling custom policy enforcement through mutation or validation.

An admission controller is a compiled plugin or webhook that intercepts requests to the Kubernetes API server after authentication and authorization, but before the object is persisted to etcd. It acts as a policy enforcement gate, capable of mutating incoming objects to inject default values or validating them to reject non-compliant configurations. This mechanism allows platform engineers to enforce security, governance, and resource management rules that go beyond native role-based access control.

In air-gapped environments, admission controllers are critical for enforcing Policy as Code (PaC) without external dependency. A ValidatingAdmissionWebhook can reject any pod that lacks a defined securityContext or attempts to mount a host path, while a MutatingAdmissionWebhook can automatically inject sidecar proxies, image pull secrets for a local offline container registry, or node selectors to confine workloads to specific hardware. This ensures every workload complies with the disconnected cluster's security posture before it is ever scheduled.

KUBERNETES SECURITY GATEKEEPERS

Key Characteristics of Admission Controllers

Admission controllers are the last line of defense in the Kubernetes API request flow, intercepting authenticated and authorized requests to enforce custom policies before objects are persisted to etcd.

01

Mutating Admission Controllers

These controllers intercept requests and can modify the object before it is persisted. They execute first in the admission chain, allowing them to inject default values, add sidecar containers, or rewrite pod specifications automatically.

  • Execution Order: Run before validating controllers
  • Common Use Case: Injecting Istio sidecar proxies into pods
  • Idempotency: Must be designed to avoid double-mutation on update operations
  • Example: A mutating webhook that automatically adds nodeSelector labels to ensure workloads land on air-gapped GPU nodes
Phase 1
Admission Chain Position
02

Validating Admission Controllers

These controllers inspect requests and accept or reject them based on defined policies. They cannot modify the object, only deny it if it violates security rules. They execute after all mutating controllers have finished.

  • Binary Decision: Only return Allowed: true or Allowed: false
  • Policy Enforcement: Block deployments that use privileged containers or unapproved registries
  • Audit Trail: Rejection reasons are logged for compliance
  • Example: Denying any pod that attempts to mount a hostPath volume in a disconnected cluster
Phase 2
Admission Chain Position
03

Dynamic Admission Webhooks

Webhooks extend the admission chain by calling external HTTP callbacks to evaluate requests. When the API server receives a matching request, it sends an AdmissionReview JSON payload to the configured webhook service and waits for a response.

  • MutatingWebhookConfiguration: Registers webhooks that can modify objects
  • ValidatingWebhookConfiguration: Registers webhooks that only approve or deny
  • Failure Policy: Configurable as Fail (reject if webhook unreachable) or Ignore (allow if unreachable)
  • Critical for Air-Gapped Clusters: Webhook services must run locally within the disconnected environment
< 10 sec
Default Timeout
04

Built-In Admission Controllers

Kubernetes ships with a set of compiled-in admission controllers that are enabled via the --enable-admission-plugins flag on the API server. These run in-process and do not require external webhook infrastructure.

  • AlwaysPullImages: Forces every pod to pull images on restart, preventing stale cached images
  • PodSecurity: Replaces the deprecated PodSecurityPolicy with built-in standards (Privileged, Baseline, Restricted)
  • ResourceQuota: Enforces namespace-level compute resource limits
  • ImagePolicyWebhook: Allows integration with external image scanning tools to validate container signatures before execution
30+
Built-In Controllers
05

Policy as Code Integration

Modern admission control leverages declarative policy languages to define security rules as version-controlled code. Tools like Open Policy Agent (OPA) and Kyverno translate high-level policies into admission decisions.

  • Rego Language: OPA's declarative policy language for expressing complex rules
  • Kyverno: Kubernetes-native policy engine that uses YAML-based policies without requiring a separate query language
  • Supply Chain Security: Policies can verify image signatures and attestations from cosign or Notary
  • Example Rule: "All pods in the air-gapped namespace must use images from the local registry registry.internal.local only"
OPA/Kyverno
Dominant Frameworks
06

Admission Controller Ordering

The admission chain follows a strict execution sequence to ensure deterministic behavior. Understanding this ordering is critical for debugging policy conflicts in air-gapped environments where external dependencies are unavailable.

  • Sequence: Authentication → Authorization → Mutating Admission → Object Schema Validation → Validating Admission → Persistence to etcd
  • Mutating Controllers: Execute in alphabetical order based on their configuration name
  • Validating Controllers: Execute in alphabetical order after all mutations complete
  • Conflict Resolution: If two mutating controllers modify the same field, the last one wins, which can cause unpredictable results if not carefully designed
Deterministic
Execution Model
ADMISSION CONTROLLER

Frequently Asked Questions

Answers to the most common questions about Kubernetes admission controllers, their mechanisms, and their critical role in enforcing security policies in air-gapped and sovereign infrastructure environments.

An admission controller is a piece of code that intercepts authenticated and authorized requests to the Kubernetes API server before the object is persisted to etcd. It acts as a final gatekeeper in the request lifecycle, sitting after authentication and authorization but before the object is stored. Admission controllers come in two types: mutating controllers, which can modify the object to inject defaults or sidecars, and validating controllers, which can only accept or deny the request based on custom logic. They are compiled into the kube-apiserver binary or deployed as external webhooks via the ValidatingWebhookConfiguration and MutatingWebhookConfiguration resources. In an air-gapped environment, admission controllers are the primary enforcement point for Policy as Code (PaC), ensuring that every pod, deployment, or configmap complies with organizational security standards without relying on external policy engines that might require internet connectivity for rule updates.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.