Search code examples
kubernetesazure-akskubernetes-pod

Kubernetes Probes - What is the order in which they examine the pod?


looking to understand the order in which kubenetes examine the pods using the 3 type of probes- startup, readiness and live.

How to understand or design these 3 probes correctly for normal applications? What is the chance of getting conflict or breaking the application if the startup probe has wrong entries


Solution

  • Startup probe

    This runs first. When it succeeds, the Readiness Probe and Liveness Probe are run continuously. If this fails, the container is killed.

    Use this for "slow staring apps", you can use the same command as Liveness if you want.

    The kubelet uses startup probes to know when a container application has started. If such a probe is configured, it disables liveness and readiness checks until it succeeds, making sure those probes don't interfere with the application startup. This can be used to adopt liveness checks on slow starting containers, avoiding them getting killed by the kubelet before they are up and running.

    From configuring probes

    Liveness probe

    This is used to kill the container, in case of a deadlock in the application.

    Readiness probe

    This is used to check that the container can receive traffic.