What Is Pod Lifecycle in Cloud Computing?
Also known as: Pod Lifecycle, Kubernetes pod phases, KCNA exam pod lifecycle, pod pending running failed, Kubernetes probes lifecycle
On This Page
Quick Definition
A pod is the smallest unit in Kubernetes, like a single box that holds one or more containers. The pod lifecycle tracks that box from the moment it is created, while it is running, when it finishes its work, or if it crashes. Understanding this lifecycle helps you know whether your application is healthy and when to debug or restart it.
Must Know for Exams
The Pod Lifecycle is a heavily tested topic in the CNCF KCNA (Kubernetes and Cloud Native Associate) exam. The exam objectives explicitly include understanding pod states and phases, container restart policies, and how probes affect pod behavior. According to the official KCNA curriculum, candidates must be able to describe the pod lifecycle, including the phases (Pending, Running, Succeeded, Failed, Unknown) and the purpose of init containers.
Questions often present a scenario where a pod is stuck in a particular state, and you must determine the root cause. For example, you might see: 'A pod is in Pending for five minutes. What is the most likely cause?'
The answer could be insufficient CPU or memory on any node, or a persistent volume claim that cannot be bound. Another common question type asks about the difference between liveness and readiness probes: 'Which probe should you configure to ensure a pod does not receive traffic until its application is ready?' The correct answer is the readiness probe.
The exam also tests the interaction between restart policies and pod phases: 'If a container exits with code 1 and the restart policy is OnFailure, what is the pod phase?' The answer is Running (since the container is restarted) — but many learners mistakenly think it becomes Failed. There are questions about init containers: 'What is the purpose of an init container in the pod lifecycle?'
The answer is that it runs to completion before the main containers start, often for initialization tasks. You also need to understand the Unknown phase: 'What does the Unknown pod phase indicate?' The correct answer is that the node controller cannot reach the node, not that the pod itself is failing.
The exam does not go deep into the Kubernetes API fields, but you must know the phases and conditions at a conceptual level. Scenario-based questions might combine multiple concepts: 'A Deployment reports that all pods are Running but the application is not responding to HTTP requests. Which probe is missing?'
The answer is a readiness probe. Another typical question: 'You have a pod with a startup probe that takes 60 seconds. What happens if the startup probe fails after 10 seconds?' The answer is that the container is killed and restarted after the failure threshold.
The KCNA exam includes questions about when to use each restart policy: Never for batch jobs that should not be retried, Always for web servers, and OnFailure for data processing tasks. You should also be familiar with the concept of pod termination — when a pod is deleted, it enters a Terminating state (not a formal phase but often tested) while the kubelet runs preStop hooks and waits for a grace period. Overall, the pod lifecycle is tested in roughly 10-15% of the KCNA exam questions, so mastering it is essential for passing.
Simple Meaning
Imagine you are sending a package through a postal service. The package has several stages: you first prepare it at your desk (creation), then it is logged into the system and waits for pickup (pending), then it travels through the sorting facility and onto a delivery truck (running), and finally it either arrives at the destination (succeeded) or gets lost or damaged (failed). The pod lifecycle is exactly that journey for a unit of work in Kubernetes, the system that runs and manages containerized applications.
When you tell Kubernetes to run a pod, it first creates a record of it in the system. The pod then enters a pending state, meaning Kubernetes is finding a suitable machine (called a node) to run it on, pulling the necessary container images, and allocating resources like CPU and memory. Once everything is ready, the pod transitions to the running state, where its containers actually execute your application code.
While running, Kubernetes continuously checks that the pod is healthy using probes — think of these as little health inspectors that knock on the door every few seconds to make sure the application inside is still working. If the application finishes its job cleanly, the pod enters the succeeded state and is eventually cleaned up. If the application crashes or encounters a critical error, the pod goes into a failed state.
There is also an unknown state, which means Kubernetes has lost contact with the node running the pod, perhaps because of a network problem or a machine that has shut down. Each state in the lifecycle gives you important clues about what is happening inside your cluster. For instance, if many pods are stuck in pending, you might be out of resources or the image name might be wrong.
If a pod keeps crashing and entering failed, you need to look at the application logs. The lifecycle is not just a sequence of events — it is a framework for monitoring, debugging, and automating responses to changes in your application’s health. Without understanding it, you would be flying blind, not knowing whether your service is actually serving users or silently broken.
The lifecycle also includes restart policies, which determine whether Kubernetes should try to revive a failed pod automatically, like an ambulance rushing to a crash site. This makes the pod lifecycle a foundational concept for anyone managing applications on Kubernetes, whether you are preparing for a certification exam or running a production system.
Full Technical Definition
In Kubernetes, a pod is the smallest deployable unit that encapsulates one or more containers with shared storage, network, and a specification for how to run them. The pod lifecycle is formally defined by a state machine that tracks the pod through several phases and conditions. The Kubernetes API server records these states in the pod’s status object, accessible via kubectl get pod or the API.
The primary phases are: Pending, Running, Succeeded, Failed, and Unknown. A pod enters the Pending phase after it is accepted by the API server. During this time, the scheduler selects a suitable node, the kubelet on that node pulls container images, mounts volumes, and initializes any init containers.
Init containers are specialized containers that run to completion before the main application containers start — they are often used for setup tasks like waiting for a database to become available or seeding configuration files. If any init container fails, the pod does not progress to Running. Once all init containers succeed and the main containers are started, the pod transitions to the Running phase.
In Running, the kubelet executes the containers according to the pod spec, applying resource limits, security contexts, and environment variables. Kubernetes also runs three types of probes: liveness probes (checks if the container is still alive), readiness probes (checks if the container is ready to serve traffic), and startup probes (for slow-starting containers). A failing liveness probe leads to container restarts based on the restart policy (Always, OnFailure, or Never).
A failing readiness probe removes the pod from service endpoints, so it does not receive traffic, but the pod itself remains running. If all containers in the pod terminate with a zero exit code and are not restarted (typically because the restart policy is Never or OnFailure), the pod enters the Succeeded phase. If any container terminates with a non-zero exit code and the restart policy does not restart it, the pod enters the Failed phase.
The Unknown phase occurs when the node controller cannot reach the node, often due to a network partition or node failure. In this case, the pod’s status is unknown, and the controller may evict the pod after a timeout (pod-eviction-timeout, default 5 minutes). Conditions are more granular status indicators that report specific aspects of the pod: PodScheduled (true when the pod is assigned to a node), Initialized (true when all init containers have completed), ContainersReady (true when all containers are ready), and Ready (true when the pod is ready to serve traffic).
These conditions are particularly useful for debugging and are used by higher-level controllers like Deployments and StatefulSets to manage rolling updates and scaling. The pod lifecycle also interacts with the garbage collection mechanism: after a pod reaches Succeeded or Failed, it may be automatically deleted after a timeout or when the parent controller (like a Job) is removed. Understanding the lifecycle is critical for writing reliable controllers and for diagnosing why an application is not working as expected in a cluster.
Real-Life Example
Think of a ride-sharing service like a taxi company. The pod lifecycle maps neatly to the journey of a ride request. First, you open the app and request a ride — this is the pod creation phase.
Your request enters the system and is in the pending state. The system (the scheduler) looks for an available driver nearby, just as Kubernetes looks for a node with enough free resources. While your request is pending, you see a screen that says 'Finding your driver' — this is exactly the pending phase.
Once a driver accepts and heads your way, the ride enters the running phase. The driver is like the node, and your car is the container running your application. During the ride, the driver periodically checks that you are still comfortable (like a liveness probe), and you check that the driver is still on the correct route (like a readiness probe).
If the driver gets lost or you ask to stop for a break, the ride might pause but not end — analogous to a container being restarted. When you reach your destination and the driver ends the trip, the ride has succeeded. If the driver cancels mid-trip because of a flat tyre (a crash), the ride fails.
Now, what about the unknown state? Imagine you are in a tunnel and your phone loses signal — the system cannot tell if the ride is still in progress or if the car has broken down. That is the unknown phase: the system has lost contact with the node.
The dispatcher (the node controller) will wait a few minutes and then assume the ride is over, dispatching a new driver for your next request. This entire process, from requesting a ride to arriving at your destination, with all the checks and possible problems along the way, mirrors exactly how Kubernetes manages pods. Each state tells you whether your application is scheduled, initializing, running, completed, or hit an error.
Just as you would check the ride status in the app to see if your driver is close, a Kubernetes administrator checks the pod status to see if their application is healthy and ready to serve users.
Why This Term Matters
Understanding the pod lifecycle matters because it directly affects how you deploy, monitor, and troubleshoot applications in Kubernetes. In real IT work, you are not just running one pod — you are managing hundreds or thousands of them across a cluster. When an application goes down, the first thing you do is check the pod status.
A pod stuck in Pending clues you into resource shortages, scheduling conflicts, or image pull errors. A pod in CrashLoopBackOff (a special condition within the lifecycle) tells you that your application is repeatedly failing, often due to a bug in the code, a missing configuration file, or a dependency that is not available. Without understanding the lifecycle, you might waste hours restarting pods manually or looking in the wrong places.
The lifecycle also governs how Kubernetes handles failures automatically. For production systems, you typically set a restart policy of Always, so that when a container crashes, Kubernetes restarts it immediately. This provides basic self-healing, but it can also mask underlying problems if you do not monitor the number of restarts.
The readiness probe is another critical concept tied to the lifecycle: it ensures that only pods that are fully initialized and ready receive traffic. If you skip the readiness probe, new pods may start accepting requests before their application is ready, causing 503 errors for users. This matters for zero-downtime deployments, where you update an application without interrupting service.
The lifecycle also integrates with other Kubernetes resources. For example, a Deployment uses the pod lifecycle to perform rolling updates: it creates new pods, waits for them to become Ready, and then terminates the old ones. If new pods fail to become Ready, the deployment rolls back automatically.
Similarly, a Job controller manages pods that are expected to run to completion (succeeded) and may retry on failure. In monitoring, you set up alerts on pod phases: for instance, alert if any pod is in Unknown for more than a minute, or if a pod has restarted more than five times in an hour. These alerts depend on a solid grasp of what each lifecycle phase means.
In short, the pod lifecycle is the heartbeat of Kubernetes operations. Without it, you cannot diagnose issues, implement self-healing, or automate deployments. It is one of the first concepts you learn and one of the most frequently used in daily cluster management.
How It Appears in Exam Questions
In certification exams such as the CNCF KCNA, questions about the pod lifecycle appear in several distinct patterns. The first pattern is identification questions: you are given a pod status output and asked to identify the current phase. For example, a question might show 'kubectl get pod webapp' output with STATUS: Pending and ask what this means.
The answer is that the pod has been accepted by the API server but is not yet scheduled or the image is being pulled. The second pattern is scenario-based troubleshooting. For instance: 'A user reports that their web application is intermittently returning 503 errors.
You check the pods and see that all are in Running state. What should you investigate next?' The expected answer is to check the readiness probe configuration, because a missing or misconfigured readiness probe can cause pods to receive traffic before they are ready.
Another scenario: 'You deploy a Job that runs a batch process. After execution, you see the pod is in Failed state. What does this indicate?' The answer is that at least one container exited with a non-zero exit code and the restart policy did not restart it.
The third pattern is comparison questions: 'What is the difference between a liveness probe and a readiness probe?' You need to explain that liveness probes determine if the container should be restarted, while readiness probes determine if the pod should receive traffic. The exam may also present a multiple-choice question with two similar options, such as 'Which probe is used to know when a container is ready to serve traffic?'
The answer is readiness probe, but a distractor might say 'liveness probe.' Another common pattern is configuration questions: 'You have a database container that takes two minutes to start. Which probe should you configure to prevent it from being killed during startup?'
The correct answer is a startup probe, because it gives the container extra time before liveness checks begin. There are also questions about restart policies: 'Which restart policy should you use for a web server that should always be running?' The answer is Always.
For a batch job that should only be retried on failure, the answer is OnFailure. For a one-time task that should never be retried, the answer is Never. Some questions ask about init containers: 'You have a pod that depends on a configuration file from a remote server.
How can you ensure the config is downloaded before the main application starts?' The answer is to use an init container that downloads the file. Finally, there are questions about the Unknown phase: 'A pod has been in Unknown state for ten minutes.
What is the most likely cause?' The answer is that the node hosting the pod has failed or lost network connectivity. These question patterns test both your recall of definitions and your ability to apply the concepts to realistic situations.
To prepare, you should be able to explain each phase, condition, probe type, and restart policy in plain terms and in the context of a scenario.
Study cncf-kcna
Test your understanding with exam-style practice questions.
Example Scenario
Imagine you are a system administrator for an online bookstore. You deploy a new version of the catalog service as a Kubernetes pod. You run kubectl get pods and see that the new pod is in Pending state for over two minutes.
You are confused because the old pod is still running fine. You check the events with kubectl describe pod, and you see a warning that the pod cannot be scheduled because no node has enough memory to meet the request. This is a classic pod lifecycle scenario: the pod was created (it has a name and is in the API server), but it is stuck in Pending because the scheduler cannot find a node with the required resources.
You realize you set the memory request too high for the new version. You reduce the memory request in the deployment YAML and reapply it. Now the pod transitions to Running after a few seconds.
The old pod is still running alongside it, serving traffic. After a minute, the new pod becomes Ready (its readiness probe returns HTTP 200), and the deployment automatically terminates the old pod. The new pod then continues in Running state.
Later, a developer pushes a buggy update. The new pod starts but the application crashes after a few seconds. The liveness probe fails, Kubernetes kills the container and restarts it.
You see the pod status change to CrashLoopBackOff, which is a condition within the Running phase. You look at the logs and find a null pointer exception. You roll back the deployment, and the pod starts successfully again, entering Running then Ready.
This scenario demonstrates how the pod lifecycle phases (Pending, Running, Succeeded, Failed, and conditions like Ready and CrashLoopBackOff) directly reflect what is happening inside the cluster and guide your troubleshooting steps.
Common Mistakes
Thinking that a pod in Pending state means the application is starting up.
Pending means the pod has not yet started running containers. It is waiting for scheduling, image pulling, or volume mounting. The application does not execute until the pod enters Running.
Remember that Pending is a pre-Running state. The application only starts when the phase changes to Running.
Confusing liveness probes with readiness probes and using them interchangeably.
Liveness probes are for restarting containers that are deadlocked or stuck, while readiness probes are for controlling traffic flow. Using a liveness probe where a readiness probe is needed can cause unnecessary restarts.
Use readiness probes to decide if traffic should be sent to the pod. Use liveness probes to decide if the container should be killed and restarted.
Believing that the Failed phase means the pod will be deleted automatically.
A Failed pod remains in the cluster until explicitly deleted or until garbage collection removes it based on a timeout. It does not automatically disappear. Kubernetes does not delete pods on failure unless a controller (like a Job) is configured to do so.
Check the pod's parent controller. A Job may delete the pod after it fails, but a standalone pod remains in Failed state until you clean it up manually.
Assuming that a pod in Unknown state is still running correctly.
Unknown means the system has lost communication with the node. The pod might be running, but it might also be dead. You cannot assume it is healthy. The node controller will eventually evict the pod.
Treat Unknown as a critical state. Investigate the node's health and connectivity immediately.
Thinking that init containers run alongside main containers.
Init containers run sequentially and must complete before any main container starts. They do not run concurrently with the application. If an init container fails, the pod does not start main containers.
Use init containers for setup tasks that must finish before the app runs. They are not for background services.
Forgetting that a pod with restart policy Always can still have a phase of Running even after multiple crashes.
After each restart, the pod remains in Running phase because Kubernetes keeps restarting the container. The phase does not change to Failed as long as the container keeps being restarted. The pod goes into CrashLoopBackOff condition but the phase is still Running.
Look at the RESTARTS column in kubectl get pods and the status column for CrashLoopBackOff. The phase is not the only indicator of health.
Exam Trap — Don't Get Fooled
A question states: 'A pod is in Running state but its container has already exited with code 0. What is the pod phase?' Many learners answer 'Succeeded' because they think a completed container means the pod succeeded.
Remember that a pod with restart policy Always will restart a container even if it exits with code 0, so the pod remains in Running. Only when all containers complete and the restart policy does not restart them (Never or OnFailure after success) does the pod enter Succeeded. Always check the restart policy before determining the phase.
Commonly Confused With
Pod phases are high-level states (Pending, Running, etc.), while pod conditions are more detailed status indicators (PodScheduled, Initialized, ContainersReady, Ready). Conditions tell you specific aspects of readiness, whereas phases summarize the overall journey.
A pod can be in Running phase but have ContainersReady condition false if one container has started but is not yet healthy.
Container lifecycle hooks (PostStart and PreStop) are events that run within the pod lifecycle at specific points, such as immediately after a container starts or before it terminates. They are not states or phases; they are actions triggered by state transitions.
When a pod is about to stop (termination), a preStop hook can run a script to gracefully shut down the application, but the pod's phase does not change to 'Terminating' as a formal phase.
Pod disruption budgets (PDBs) are about ensuring a minimum number of pods are available during voluntary disruptions, like node maintenance. They do not define the pod lifecycle states but constrain when pods can be terminated. The lifecycle runs independently of PDBs.
A PDB might prevent you from deleting a pod during a rollout, but the pod itself still follows the normal lifecycle from Running to Succeeded or Failed.
A Deployment rollout status (e.g., Progressing, Complete, Failed) is a higher-level concept that aggregates the states of multiple pods managed by the Deployment. It is not the same as a single pod's lifecycle. A Deployment can be in a 'Progressing' state even if some of its pods are in Pending.
You perform a rolling update; the Deployment status shows 'Progressing' while new pods are in Pending and old pods are in Running. The pod lifecycle and the deployment status are related but different.
The node lifecycle deals with the states of a worker node (e.g., Ready, NotReady, DiskPressure), not the pods running on it. A node can be NotReady, causing pods on that node to enter Unknown phase, but the node and pod lifecycles are separate concepts managed by different controllers.
If a node goes down, the pod lifecycle changes to Unknown, but the node lifecycle changes to NotReady. They are two different status objects.
Step-by-Step Breakdown
Creation
You submit a pod manifest to the Kubernetes API server using kubectl apply or the API. The API server stores the pod object in etcd and generates a unique name. The pod enters the system with a phase of Pending. No containers are running yet.
Scheduling
The Kubernetes scheduler watches for unscheduled pods (those without a nodeName set). It selects a suitable node based on resource requests, constraints, node affinity, and taints. If no node is available, the pod remains Pending with a scheduling failure event. Once a node is assigned, the scheduler updates the pod object.
Init Container Execution
The kubelet on the assigned node pulls images for any init containers defined in the pod spec. Init containers run in order, one at a time, to completion. If an init container fails, the pod does not proceed to the next step and the kubelet may retry according to the restart policy for init containers. Only when all init containers succeed do the main containers start.
Main Container Startup and Probing
The kubelet pulls the main container images, creates the container, and starts it. It then runs startup, liveness, and readiness probes as configured. If a startup probe fails, the container is killed and restarted. Once the startup probe succeeds, liveness and readiness probes begin. The pod phase transitions to Running when at least one main container is executing.
Running and Health Monitoring
While the pod is in Running phase, the kubelet continuously checks liveness probes. If a liveness probe fails, the container is restarted (based on restart policy). The readiness probe determines if the pod should receive traffic; if it fails, the pod is removed from Service endpoints but remains in Running phase. The pod can also become unhealthy without leaving Running and may enter CrashLoopBackOff condition.
Termination
When the pod is deleted, either by a user, a controller, or because of eviction, the kubelet runs any preStop hook defined in the container spec. It then sends a SIGTERM signal to the main process, waits for the termination grace period (default 30 seconds), and then sends SIGKILL if the process has not exited. The pod enters a Terminating state (not an official phase) until all containers stop.
Final Phase: Succeeded or Failed
After all containers have stopped, the pod enters either Succeeded (if all containers exited with code 0 and no restarts occurred) or Failed (if any container exited with non-zero and restart policy did not restart it). The pod remains in the cluster until garbage collected or manually deleted.
Practical Mini-Lesson
Let us walk through a complete practical understanding of the pod lifecycle as if you are managing a real Kubernetes cluster. Imagine you have a simple web server that you deploy as a pod. You write a YAML file that specifies the container image, a memory request of 256 Mi, a readiness probe that checks an HTTP endpoint, and a restart policy of Always.
When you apply this file, the API server creates a pod object. The pod enters Pending. At this point, you can run kubectl describe pod to see events. The scheduler picks a node with enough memory.
If no node has 256 Mi free, the pod stays Pending and you will see an event like '0/3 nodes are available: 3 Insufficient memory'. This is a signal to reduce the request or add more nodes. Once scheduled, the kubelet pulls the image.
If the image does not exist locally and the pull takes time, the pod remains Pending. You can check the pod status with kubectl get pods -w to see when it changes to Running. After the container starts, the readiness probe begins checking.
If your application listens on /healthz but you configured the probe to check /ready, the probe might fail because that endpoint does not exist. The pod will be in Running phase but never become Ready. You will see 0/1 ready in the READY column.
To fix this, update the probe path. Now consider a scenario where your application has a memory leak. After a few hours, the container exceeds its memory limit and is OOM killed. The liveness probe fails, and Kubernetes restarts the container.
The pod stays in Running, but you will see the RESTARTS column increment. If the crash happens repeatedly, the restart backoff delay increases (10 seconds, then 20, then 40, up to 5 minutes). The pod may enter CrashLoopBackOff.
This is not a phase but a condition; the phase is still Running. You must look at the logs to find the memory leak. In a production environment, you would set up monitoring alerts on restart counts and on CrashLoopBackOff.
You would also set resource limits to prevent a single pod from starving other pods. Another practical aspect is the pod termination during a rolling update. When you update the image, the Deployment creates a new pod.
The old pod gets a deletion timestamp. The kubelet runs the preStop hook if defined. For a web server, you might run a script that drains connections from the load balancer. After the grace period, the container is killed.
The old pod enters Terminating state and then disappears. Your understanding of the lifecycle helps you set the terminationGracePeriodSeconds appropriately — too short causes connection drops, too long delays the rollout. Finally, in a cluster with node failures, you might see pods in Unknown.
The node controller waits for pod-eviction-timeout (default 5 minutes) before marking the pod for deletion and rescheduling it. If you have stateful applications, you need to handle this carefully to avoid data loss. The pod lifecycle is not just theory — it is the foundation for building resilient, self-healing applications.
As a Kubernetes administrator, you will use lifecycle concepts every day to write deployment specs, configure probes, set resource limits, and debug issues. Mastering this makes you proficient in cluster operations and prepares you for real-world scenarios and certification exams alike.
Memory Tip
Think of the acronym 'PSRU' for the phases: Pod Pending, Scheduled, Running, Unknown (or Succeeded/Failed). For probes, remember 'LRL' — Liveness (Restarts), Readiness (Load balancing), startup (Late start).
Covered in These Exams
Related Glossary Terms
Two-factor authentication (2FA) is a security method that requires two different types of proof before granting access to an account or system.
An A record is a DNS record that maps a domain name to the IPv4 address of the server hosting that domain.
5G is the fifth generation of cellular network technology, designed to deliver faster speeds, lower latency, and support for many more connected devices than previous generations.
802.1Q is the networking standard that allows multiple virtual LANs (VLANs) to share a single physical network link by tagging Ethernet frames with VLAN identification information.
Frequently Asked Questions
What is the difference between pod phase and pod condition?
The pod phase is a high-level summary of where the pod is in its lifecycle (Pending, Running, Succeeded, Failed, Unknown). Pod conditions are more detailed boolean flags that indicate specific statuses like PodScheduled, Initialized, ContainersReady, and Ready. You use conditions for fine-grained health checking.
Can a pod be in Running phase but not serve traffic?
Yes, absolutely. A pod can be in Running if its containers are running, but if the readiness probe fails, the pod is marked as not Ready and is removed from Service endpoints. The phase remains Running, but the Ready condition is false.
What happens if a pod stays in Pending for too long?
The pod will remain in Pending indefinitely until the issue is resolved. Common causes include insufficient cluster resources, persistent volume claims that cannot be bound, image pull errors, or no node that matches the pod's constraints. You should check the events with kubectl describe pod.
What is the CrashLoopBackOff status?
CrashLoopBackOff is a condition that occurs when a container in a pod repeatedly crashes and is restarted by Kubernetes. The restart backoff time increases after each crash up to a maximum. The pod phase remains Running because Kubernetes is still trying to restart the container. It is not a separate phase.
How do I know if a pod is healthy if it is in Running phase?
Look at the READY column in kubectl get pods to see how many containers are ready (e.g., 1/1). Also check the RESTARTS column for frequent restarts. Use kubectl describe pod to see conditions like ContainersReady and Ready. Additionally, check the pod logs and events.
What is the purpose of the termination grace period?
The termination grace period gives the container time to shut down gracefully before being forcefully killed. During this time, the kubelet runs the preStop hook if defined and sends a SIGTERM. After the period expires, SIGKILL is sent. This allows applications to close connections and save state.
Can I change the pod phase manually?
No, the pod phase is managed by the Kubernetes control plane and kubelet. You cannot manually set the phase. You can only trigger transitions by deleting the pod or updating its spec (which creates a new pod).
Does a pod always go through all five phases?
No. A pod can skip phases. For example, a pod that runs a quick batch job goes from Pending to Running to Succeeded, never entering Failed or Unknown. A pod that crashes immediately might go from Pending to Running to Failed, never reaching Succeeded.
What is the difference between a pod restart and a pod replacement?
A restart means the same container within the same pod is started again (e.g., after a crash). A replacement means a new pod is created to replace an old one, often managed by a Deployment. The pod lifecycle applies to each individual pod, not to the replacement process.
Summary
The Pod Lifecycle is a core concept in Kubernetes that defines the journey of a pod from creation to termination. It includes five main phases: Pending, Running, Succeeded, Failed, and Unknown, each providing insight into the pod's status. Conditions like PodScheduled, Initialized, ContainersReady, and Ready offer more granular details.
Understanding the lifecycle is essential for troubleshooting, monitoring, and automating the management of containerized applications. In the KCNA exam, you will encounter scenario-based questions that test your ability to interpret pod states, configure probes (liveness, readiness, startup), and choose appropriate restart policies. Common mistakes include confusing phases with conditions, misapplying probe types, and misunderstanding the behavior of restart policies.
To master the topic, remember that a pod in Pending is not yet running, a pod in Running may still be unhealthy if readiness probes fail, and a pod in Unknown signals a node problem. Use the lifecycle as a diagnostic tool: check the phase first, then look at conditions, events, and logs to pinpoint issues. With this knowledge, you will be well-prepared both for certification exams and for real-world Kubernetes administration, where the pod lifecycle is the first thing you look at when something goes wrong.