Member-only story
Kubernetes POD Readiness
Lets first discuss about the life cycle of a POD before we talk about the Readiness.
A POD has status and some other conditions. The POD status tells that where the POD is in its life-cycle.
- Pending -POD is first created. The scheduler tries to find out where (a node) to place the POD. You can use kubectl describe pod command to find out if its stuck in pending state.
- ContainerCreating -Once POD is scheduled, it goes in to container creating state where images required for the application are pulled and creating the container(s).
- Running -Once all the containers in the POD starts, it goes in to running state.
It is important to know that in any point, a POD status can be one of above values. It will give us the high level summary of the POD (kubectl get pods).
Sometimes you may want additional information about POD.
POD Conditions
This is an array of true/false values which will tell us the state of the POD.
- PodScheduled -Scheduled to initialize.
- Initialized -POD is initialized to pull containers.
- ContainersReady -If all the containers are initialized and ready.
- Ready -If call the containers started.
To see the content of POD’s conditions, run the kubectl describe pod command and look for conditions section.