DevOpsLesson
DevOpsLesson

Free, comprehensive DevOps tutorials and learning roadmaps. Master Docker, Kubernetes, CI/CD, and more.

Stay Updated

Get notified about new tutorials and features.

Tutorials

  • What is DevOps?
  • Docker Tutorial
  • Terraform Tutorial
  • CI/CD Pipeline
  • All Tutorials

Roadmaps

  • DevOps Engineer
  • Cloud Engineer
  • SRE Path
  • All Roadmaps

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 DevOpsLesson. All rights reserved.

DOCKERKUBERNETESTERRAFORMAWSCI/CDLINUXGITDEVOPS ROADMAPCLOUD ROADMAPSRE ROADMAPGIT CHEATSHEETDOCKER CHEATSHEETK8S CHEATSHEETTF CHEATSHEETLINUX CHEATSHEETDOCKERFILE LINTERYAML VALIDATORCRON PARSERREGEX TESTER

Kubernetes Tutorial

Introduction to Kubernetes
Kubernetes Architecture
Installing Kubernetes
kubectl Basics
Kubernetes Pods
Kubernetes Deployments
Kubernetes Services
ConfigMaps and Secrets
Kubernetes Storage
Kubernetes Namespaces
Kubernetes Resource Management
Helm for Kubernetes
Kubernetes Monitoring

Kubernetes Pod Lifecycle

PreviousPrev
Next

Understand pod phases, container states, restart policies, and what Kubernetes does when pods or nodes fail.

Why Pod Lifecycle Matters

Pods do not simply move from created to running forever. They pass through phases, containers move between states, and failures trigger recovery behavior.

Pod Phases

PhaseMeaning
PendingPod accepted, but containers not fully started yet
RunningPod bound to a node and at least one container is running or starting
SucceededAll containers finished successfully
FailedAll containers terminated and at least one failed
UnknownThe control plane cannot determine pod state reliably

Container States

Inside a pod, each container has its own state:

  • Waiting
  • Running
  • Terminated

A pod may be Running while one container inside it restarts repeatedly.

Restart Policies

PolicyMeaning
AlwaysRestart containers whenever they exit
OnFailureRestart only if a container exits with failure
NeverDo not restart automatically

Deployments typically rely on Always because they are meant for long-running services.

Pod Phase State Machine

Pod phase state machine

Pending

Scheduling or pulling image

scheduled + containers start

Running

At least one container active

all completed (0)

Succeeded

All containers exited 0

container exited non-0

Failed

Container exited with error

Unknown

Node lost communication

Reading the STATUS Column

The kubectl get pod STATUS column can show values such as:

  • Running
  • Pending
  • CrashLoopBackOff
  • ImagePullBackOff
  • Completed
  • Error

Some of these are not official pod phases. They are user-friendly status summaries that help explain what is going wrong.

What Happens on Node Failure?

If a node fails, pods on that node may become unreachable. For managed workloads like Deployments, Kubernetes usually creates replacement pods on healthy nodes once the failure is detected.

Key Idea

Pods are disposable. The system is designed to replace them, not treat each one like a precious pet server.

That is a major cloud-native mindset shift.

Exercise

Pending Meaning

What does the `Pending` pod phase mean?

Exercise

CrashLoopBackOff Meaning

If `kubectl get pod` shows `CrashLoopBackOff`, what is generally happening?

PreviousPrev
Next

Continue Learning

kubectl contexts and namespaces

Understand kubeconfig structure, switch safely between clusters, and scope kubectl commands with namespaces.

18 min·Easy

Kubernetes Pods

Understand what a Pod is, why Kubernetes schedules pods instead of raw containers, and how containers share networking and storage inside a pod.

16 min·Easy

Kubernetes Pod Manifest

Learn the anatomy of Pod YAML and understand the purpose of apiVersion, kind, metadata, labels, annotations, and the spec section.

20 min·Easy

Explore Related Topics

Do

Docker Tutorials

Build the containers Kubernetes orchestrates

Te

Terraform Tutorials

Provision Kubernetes clusters as code

Try the Tool

YAML Validator

Validate Kubernetes manifests and any YAML files instantly.

On This Page

Why Pod Lifecycle MattersPod PhasesContainer StatesRestart PoliciesPod Phase State MachineReading the `STATUS` ColumnWhat Happens on Node Failure?Key Idea