📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials Kubernetes Kubernetes Probes

Kubernetes Probes

5 min read Quiz at the end
Liveness probes restart crashed containers; Readiness probes remove unhealthy pods from load balancers.

Liveness, Readiness, Startup Probes

containers:
  - name: myapp
    image: myapp:1.0

    # Restart pod if this fails
    livenessProbe:
      httpGet:
        path: /health
        port: 3000
      initialDelaySeconds: 10
      periodSeconds: 30
      failureThreshold: 3

    # Remove from load balancer if this fails
    readinessProbe:
      httpGet:
        path: /ready
        port: 3000
      initialDelaySeconds: 5
      periodSeconds: 10

    # Give slow-starting containers extra time
    startupProbe:
      httpGet:
        path: /health
        port: 3000
      failureThreshold: 30  # 30 * 10s = 5 minutes max
      periodSeconds: 10
Topic Quiz · 1 questions

Test your understanding before moving on

1. What is the difference between livenessProbe and readinessProbe?
💡 Liveness = is the container alive? Readiness = is the container ready to serve traffic?