System Atlas
the atlas

The lifecycle of a Kubernetes pod

From 'Pending' to 'Running' to a graceful goodbye — how a pod actually lives and dies.

the gist

A pod moves through phases: Pending (accepted but not yet running), Running (scheduled and at least starting), and finally the terminal Succeeded or Failed (with Unknown when the node is unreachable). Along the way it is scheduled to a node, may run init containers, and is watched by readiness and liveness probes governed by a restart policy — and when it's deleted it gets a graceful SIGTERM before a hard SIGKILL.

ANALOGY // It's like onboarding an employee: they're hired but deskless (Pending), get seated at a workstation (scheduled), complete required paperwork first (init containers), start working and get periodic check-ins (probes), and when they leave they get two weeks' notice before their badge is deactivated (graceful termination).
living diagram01 / 07
Create podkubectl / APIPendingaccepted, unscheduledScheduledbound to a nodeInit containersrun to completionRunningapp containers upProbesreadiness · livenessTerminatingSIGTERM → grace → SIGKILLSucceeded / Failedterminal phase
01

Pending

The moment you create a pod, the API server accepts it and it enters the Pending phase. At this point it exists as a desired-state object but isn't running anywhere yet — it may be waiting for the scheduler, for a node with room, or for its container images to be pulled. A pod stuck in Pending usually means the cluster can't find a node that satisfies its resource requests or constraints.

02

Scheduled to a node

The scheduler watches for unscheduled pods and binds each one to a node that has enough CPU, memory, and matching constraints (affinity, taints, selectors). Once bound, the kubelet on that node takes over: it pulls the container images and prepares to start the containers. Scheduling is the pivot from 'a wish' to 'a workload on a specific machine.'

03

Init containers

Before the main application containers start, any init containers run one at a time, in order, and each must exit successfully before the next begins. They're used for setup work — waiting for a dependency, running a migration, fetching config or secrets — that must finish first. If an init container fails, the kubelet retries it according to the restart policy, and the app containers never start until all of them succeed.

04

Running

Once the images are pulled and any init containers have completed, the app containers start and the pod enters the Running phase, meaning it's bound to a node and at least one container is starting or running. This is the steady state where your application actually does its work. A pod can stay Running for seconds or months depending on what it does.

05

Probes and restart policy

While Running, the kubelet continuously checks the containers. A liveness probe detects a hung or broken container and restarts it; a readiness probe decides whether the pod is healthy enough to receive traffic, temporarily pulling it from service endpoints if not. Whether a failed or exited container is restarted is governed by restartPolicy — Always, OnFailure, or Never — with exponential back-off between attempts.

06

Graceful termination

When a pod is deleted or evicted, Kubernetes doesn't just kill it. It sends SIGTERM to the containers and starts a grace period (30 seconds by default), during which the app should finish in-flight requests, flush data, and shut down cleanly. If the container is still alive when the grace period expires, Kubernetes sends SIGKILL to force it. Meanwhile the pod is removed from service endpoints so no new traffic arrives.

07

Terminal phases

A pod ends in a terminal phase: Succeeded if all its containers exited without error (typical for a batch Job), or Failed if at least one container terminated in error and won't be restarted. A fourth phase, Unknown, appears when the control plane loses contact with the pod's node and can't determine its state. Terminal pods stop consuming resources but their records may linger for inspection.

the full picture
01

Why the lifecycle matters

A pod is the smallest deployable unit in Kubernetes — one or more tightly coupled containers that share a network address and storage, scheduled and run as a single thing. Everything you deploy on Kubernetes ultimately runs as pods, so understanding how a pod is born, lives, and dies is the key to reasoning about almost every operational question: why won't my app start, why did it restart at 2 a.m., why did requests fail during a deploy?

Kubernetes describes a pod's high-level status with a phase — a small, deliberately coarse summary of where the pod is in its life — while the fine detail lives in per-container statuses and conditions. The phases are Pending, Running, Succeeded, Failed, and the special Unknown. The journey between them is where init containers, probes, restart policies, and graceful shutdown all come into play.

02

Pending: accepted, but not yet running

When you kubectl apply a pod (or, more usually, a Deployment creates one for you), the API server validates and stores it, and the pod immediately enters the Pending phase. Pending means "Kubernetes has accepted this pod, but one or more of its containers is not yet running." Several things happen during Pending:

  • The scheduler looks for a node that can host the pod. It filters nodes by the pod's resource *requests* (CPU, memory) and constraints (node selectors, affinity/anti-affinity rules, taints and tolerations), then scores the survivors and binds the pod to the best one.
  • Once bound, the kubelet on that node pulls the required container images from the registry, which can itself take time for large images.

A pod that lingers in Pending is one of the most common things to debug, and the phase name tells you where to look: there's no node that satisfies its requirements, or the image can't be pulled. It is a scheduling or placement problem, not an application bug.

03

Starting up: init containers, then the app

Before a pod's main application containers run, Kubernetes runs any init containers it declares. These are ordinary containers with a special contract: they run sequentially, one at a time, and each must exit successfully before the next starts, and before *any* app container starts. They exist for setup that must complete first — waiting for a database to accept connections, running a schema migration, generating configuration, or fetching secrets into a shared volume.

If an init container fails, the kubelet restarts it according to the pod's restart policy (backing off between attempts), and the app containers simply never start until all init containers have succeeded. This ordering guarantee is why init containers are the idiomatic place for "make sure the world is ready" logic, keeping that concern out of your application image.

Once every init container has completed and the app containers have been started by the kubelet, the pod transitions to the Running phase: it is bound to a node and at least one container is starting or already running. This is the steady state your workload spends most of its life in.

04

Staying healthy: probes and restart policy

Being "Running" doesn't mean "healthy," so while a pod runs the kubelet continuously interrogates its containers with probes:

  • A liveness probe answers "is this container still working, or is it wedged?" If it fails repeatedly, the kubelet restarts the container — the cure for deadlocks and hangs that haven't crashed the process.
  • A readiness probe answers "should this container receive traffic right now?" If it fails, the pod is temporarily removed from its Service's endpoints, so requests are routed only to instances actually able to serve them. This is what prevents traffic hitting a pod that's still warming up.
  • A startup probe can guard slow-starting apps, holding off the other probes until the app has finished booting.

Whether a container that crashes or exits is restarted is governed by the pod's restartPolicy: Always (the default, used for long-running services), OnFailure (restart only on non-zero exit, common for Jobs), or Never. Restarts use exponential back-off, so a container stuck in a crash loop is retried with ever-longer delays — the origin of the familiar CrashLoopBackOff status.

05

Winding down: graceful termination and terminal phases

Pods are meant to be disposable, so Kubernetes deletes them constantly — during rollouts, scale-downs, and node drains. Crucially, deletion is graceful, not abrupt. When a pod is marked for deletion, two things happen in parallel: it is removed from Service endpoints so no new traffic is sent to it, and each container receives a SIGTERM signal. A termination grace period (30 seconds by default) then begins, giving the application time to finish in-flight requests, flush buffers, close connections, and exit on its own. Only if a container is still alive when the grace period expires does Kubernetes escalate to SIGKILL, forcing it to stop. Well-behaved apps trap SIGTERM and shut down cleanly within the window, which is what makes zero-downtime deploys possible.

Eventually every pod reaches a terminal phase. Succeeded means all containers exited successfully and won't be restarted — the normal end for a batch Job. Failed means at least one container terminated in error and the restart policy won't revive it. The fifth phase, Unknown, is different: it means the control plane has lost contact with the pod's node and genuinely can't tell what state the pod is in, usually pointing at a node or network failure rather than anything the pod did. Understanding this full arc — Pending, scheduling, init, Running, probes, graceful termination, terminal — turns opaque pod behavior into a story you can read straight off kubectl describe.

what to remember
01

Pod phases: Pending → Running → Succeeded/Failed, with Unknown if the node can't be reached.

02

The scheduler binds a Pending pod to a node with enough resources before containers can start.

03

Init containers run to completion, in order, before the app containers start.

04

Liveness probes restart a stuck container; readiness probes decide when it receives traffic.

05

restartPolicy (Always / OnFailure / Never) controls whether crashed containers are restarted.

06

Deletion is graceful: SIGTERM, then a grace period, then SIGKILL if the container hasn't exited.

check yourself

Quick quiz

Q1

Why might a pod stay stuck in the Pending phase?

Q2

What happens first when a pod is deleted?

follow the thread