Kubernetes YAML Cheat Sheet/HTTP liveness, readiness, and startup probes

Use health checks to control traffic and restarts.

Section: Probes and Resources

HTTP liveness, readiness, and startup probes

yaml
yaml
livenessProbe:
  httpGet:
    path: /healthz
    port: http
  initialDelaySeconds: 10
  periodSeconds: 10

readinessProbe:
  httpGet:
    path: /ready
    port: http
  initialDelaySeconds: 5
  periodSeconds: 5

startupProbe:
  httpGet:
    path: /startup
    port: http
  failureThreshold: 30
  periodSeconds: 10

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Probes and Resources
CPU and memory requests/limits
Define scheduler reservations and hard caps.
OpenIn sheetyamlsame section
Container securityContext
Drop privileges and run as non-root.
OpenIn sheetyamlsame section
Minimal Pod manifest
Smallest practical Pod YAML shape.
Labels and annotations example
Common metadata block for selectors and tooling.
Override container command and args
Set entrypoint-style command in YAML.
Basic Deployment YAML
Run a replicated stateless workload.