Skip to content

API Server Request Processing Plugins

Learn about the three stages (authentication, authorization, and admission control) through which the Kubernetes API server processes requests.


API Server Request Processing Pipeline

Every HTTP request that reaches the Kubernetes API server passes through the following security stages in order.

    flowchart TD
    Request["HTTP Request / kubectl request"] --> AuthN["1. Authentication"]
    AuthN -- "401 Unauthorized" --> Deny1[Request denied]
    AuthN -- "Authentication succeeded (User/Group extracted)" --> AuthZ["2. Authorization"]
    
    AuthZ -- "403 Forbidden" --> Deny2[Request denied]
    AuthZ -- "Authorization succeeded (permissions verified)" --> Admission["3. Admission Control"]
    
    Admission -- "403 Forbidden" --> Deny3[Request denied]
    Admission -- "Approved" --> ETCD[("4. Persist to etcd and return the result")]
  

Detailed Flow by Stage

Stage 1: Authentication

This stage verifies “Who is the requester?” The API server runs the configured authentication plugins in order, and the requester is identified as soon as any one of them succeeds.

Plugin TypeDescriptionMain Use
X.509 Client CertsChecks the CN and O fields of the client certificateAdministrators, kubelet communication
Static Token FileChecks tokens defined in a static file on the API serverTesting, legacy environments
ServiceAccountChecks the JWT mounted in the PodPod (application) authentication
OIDCValidates tokens issued by an external identity provider (Google, Okta, etc.)Enterprise integrated authentication
WebhookDelegates authentication requests to an external serviceIntegration with custom authentication systems
AnonymousTreated as system:anonymous if all other authenticators fail (when enabled)Health checks (/healthz), etc.

Stage 2: Authorization

This stage checks “Does the authenticated user have permission to perform a specific action on that resource?”

Authorization ModeDescriptionNotes
NodeRestricts each kubelet to accessing only the resources related to its own NodeSpecial-purpose authorization
RBACPermission management through Roles and RoleBindingsThe most recommended approach
WebhookAsks an external service to decide (allow or deny)Custom authorization systems
ABACFile-based attribute-based access controlNot recommended because it is hard to manage
AlwaysAllowUnconditionally allows every requestSecurity risk (testing only)

Stage 3: Admission Control

This is the final check of whether a request that has passed authentication and authorization “satisfies the cluster’s policies.”

  1. Mutating admission: Modifies the request or fills in default values. (e.g., sidecar injection)
  2. Validating admission: Validates the request and decides whether to reject it. (e.g., ResourceQuota check)

Summary

StageMain RoleCode Returned on Failure
AuthenticationIdentity verification (who)401 Unauthorized
AuthorizationPermission verification (what)403 Forbidden
AdmissionPolicy review (policy)403 Forbidden

Understanding the API server’s request pipeline lets you accurately diagnose security misconfigurations in the cluster.