A kubectl create deployment hits the API server. Walk me through what happens to that request, in order, before anything is written to etcd.
- Authorization → authentication → validation → admission. You cannot decide what a caller may do before knowing who they are.
- Authentication → authorization (RBAC) → mutating admission → schema validation → validating admission → persist. Identity first, permission second, then admission shapes and checks the object; mutating runs before validating so validators see the final object.
- Validating admission → mutating admission, so mutations cannot break validation. It is the reverse: mutations happen first precisely so validation checks the mutated object.
- Admission runs asynchronously after the object is stored. Admission is synchronous and in the request path; that is why a broken webhook can block writes.
The order is authentication, then authorization, then mutating admission, then validation, then validating admission, then etcd.
The pipeline is authn → authz → admission (mutating, then built-in validation, then validating) → etcd. Each stage can reject. Knowing the order explains real behaviours: why a sidecar injector (mutating) runs before a policy check (validating), and why webhook outages look like "cannot create anything".
Putting validation before mutation, or treating admission as something that runs after the write. Admission is synchronous and in the request path, which is exactly why a dead webhook blocks the whole cluster.