Admission and object lifecycle
An accepted request is not a ready workload
A typical persistent object write reaches the API server, is authenticated and authorized, passes decoding and applicable admission/validation, and is stored. Authentication identifies a caller, authorization checks the requested action, and admission evaluates or changes eligible requests before persistence. Conversion and defaulting may occur as part of decoding and processing; precise ordering depends on the resource and request path. A controller later reacts to the stored desired state. The API may accept a Deployment even though its Pods cannot yet be scheduled. The diagram is a mental model, not an exact internal call stack.
request -> authentication -> authorization -> admission/validation -> persistence | v controller -> observed statusMutation, validation and version conversion
Mutating admission can add defaults or enforce a required representation by changing a request; validating admission accepts or rejects based on policy without mutating it. Mutating admission precedes validating admission, but built-in decoding, defaulting, conversion and validation details are resource-specific. A server-side dry run exercises applicable server processing without persisting the result, subject to dry-run support and webhook side-effect declarations. A successful dry run is not proof of scheduling or application health. Multiple API versions can represent the same resource; conversion translates representations and storage version governs persistence. Discover actual served versions and avoid relying on removed APIs.
Input: replicas omittedIllustrative policy/defaulting result: replicas=1Validation: allowedDry run: response only, no stored new objectGeneration, observedGeneration and conditions
metadata.generation is a resource-dependent counter for desired-state revisions; it is distinct from resourceVersion, which tracks persisted changes including status. A controller may report status.observedGeneration to say which generation it has processed. Where supported, conditions provide typed observations with status, reason and message; some conditions carry their own observedGeneration. If a Deployment has generation 4 and observedGeneration 3, its status may be stale relative to the latest spec. Even matching generations do not guarantee readiness; inspect the condition and replica counts and test the application separately. Do not assume every resource uses identical condition fields.
metadata: generation: 4 resourceVersion: token-Zstatus: observedGeneration: 3 readyReplicas: 2 conditions: - type: Available status: "True" reason: MinimumReplicasAvailableDeletion and finalizers
A deletion request may set metadata.deletionTimestamp while finalizers remain. A finalizer is a key recording cleanup responsibility, not executable code. A responsible controller completes its work and removes its key; once required finalization and other deletion constraints finish, the API can remove the object. A stuck finalizer is a diagnostic signal. Inspect the responsible controller, its logs and dependent state in an approved environment; do not casually remove finalizers, since cleanup or protection may be lost. Garbage collection uses owner references and propagation policy, which is separate from application-level cleanup.
metadata: name: catalog-data uid: uid-storage-a deletionTimestamp: "2026-01-01T10:00:00Z" finalizers: - kubernetes.io/pvc-protectionPractice: interpret lifecycle evidence
Read lifecycle-cases.json. Identify rejected writes, accepted dry runs, stale status, current but unavailable status, and pending finalization. Explain what evidence would establish actual readiness or safe deletion. Local fixtures assert only these classifications; admission webhooks, etcd writes and garbage collection are not executed. The next chapter explains how authentication and RBAC control which requests can reach these stages.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Admission and object lifecycle — knowledge check
Interpret synthetic Kubernetes API evidence.
A Deployment write succeeds. What does that establish?
Which admission stage can change a request?
What does a successful server-side dry run not do?
Generation is 4 and observedGeneration is 3. What is the correct interpretation?
An object has deletionTimestamp and a remaining finalizer. What should you do first?