Pod and Container Lifecycle (within a Pod)

Container Lifecycle (within a Pod)

Each container follows this:

  1. Image Pull (if not present)
  2. Created
  3. Started
  4. Running
  5. Stopped (Exited) — success or failure
  6. Restarted (if policy is Always or OnFailure)
  7. Terminated
Pod Lifecycle Phases
  1. Pending
    • Pod accepted by the API server, but not yet running on any node.
  2. Scheduled
    • Pod has been assigned to a specific node by the scheduler.
  3. Initialized
    • All initContainers have successfully completed (if any).
  4. Running
    • Pod’s main containers are running or starting.
  5. Ready
    • Pod has passed all readiness probes and is ready to serve traffic.
  6. Succeeded
    • All containers completed successfully (exit code 0) — common for Jobs.
  7. Failed
    • One or more containers exited with an error and won’t be restarted.
  8. Unknown
    • The pod’s state can’t be determined (e.g., node crash/unreachable).
  9. Terminating(transitional state)
    • Pod is being deleted; Kubernetes tries to shut it down gracefully.

Leave a Comment

Your email address will not be published. Required fields are marked *