KCNA ยท Storage and troubleshooting
Liveness, readiness and startup probes
Liveness, readiness, startup probes, restartPolicy, Pod phases and container states.
Key points
- The kubelet runs probes against containers.
- A failing liveness probe gets the container killed and restarted per restartPolicy.
- A failing readiness probe marks the Pod not Ready and removes it from Service endpoints without restarting.
- A startup probe holds off the other two until the app has started.
Practice questions
Which probe failure removes a Pod from Service endpoints without restarting the container?
- None of them
- Readiness
- Liveness
- Startup
Show answer
Answer: B. Readiness
A failing readiness probe makes the Pod not Ready, so traffic stops, but the container keeps running. A liveness failure restarts the container instead.
Which are valid probe mechanisms in Kubernetes?
- udpSocket
- icmpPing
- exec
- httpGet
- grpc
Show answer
Answer: C. exec, D. httpGet, E. grpc
Probes can use exec, httpGet, tcpSocket and grpc. udpSocket and icmpPing are not probe handlers.
True or false: when a readiness probe fails, the kubelet restarts the container.
Show answer
Answer: False
False. A readiness failure only marks the Pod not Ready and takes it out of Service endpoints. Restarts come from failed liveness or startup probes.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
