Health Checks: Liveness & Readiness Probes
Kubernetes uses three distinct probe types to manage container health:
startupProbe: Determines if the application within the container has started. All other probes are disabled until the startup probe succeeds.livenessProbe: Detects if a container has deadlocked or crashed. If the liveness probe fails, Kubelet kills the container and initiates a restart according to therestartPolicy.readinessProbe: Determines if a container is ready to accept user network traffic. If it fails, the Pod IP is removed from matching Service EndpointSlices.
spec: containers: - name: web image: myapp:1.0 readinessProbe: httpGet: path: /healthz/ready port: 8080 initialDelaySeconds: 5 periodSeconds: 5 livenessProbe: httpGet: path: /healthz/live port: 8080 initialDelaySeconds: 15 periodSeconds: 10