How Kubernetes stateful set controller determine if a pod is in ready state

8/17/2020

I am trying to use kubernetes stateful set controller for one of my application. As i understand from the documentation of stateful set, with Orderedready policy it creates the pod in order and does not proceed to create the next one until the previous one is in ready state. My question is how the controller determine the pod is in ready state ? what probe it perform to determine if the current pod is in ready state ?

-- dsingh
kubernetes

2 Answers

5/18/2021
-- e_z
Source: StackOverflow

8/17/2020

The statefulset controller doesn't perform any probe, it watches for its pods that are in Running and Ready state.

The status of the Pod's is updated by the APIserver after performing the probe checks. If you configure custom probes ( ie. readinessProbe, livenessProbe), those will be used. Otherwise,

If a Container does not provide a liveness probe, the default state is Success.

If a Container does not provide a readiness probe, the default state is Success.

-- Kamol Hasan
Source: StackOverflow