Health Probes
Health probes let Kubernetes know when your containers are ready and alive.
Liveness Probe
components:
backend:
image: myapp:latest
port: 8000
probes:
liveness: "/healthz"
Readiness Probe
components:
backend:
image: myapp:latest
port: 8000
probes:
readiness: "/ready"
Both
components:
backend:
image: myapp:latest
port: 8000
probes:
liveness: "/"
readiness: "/test"
Tip
If only liveness is set, Kubernetes will use it for both readiness and liveness checks by default.
Python
from helm_me import web, image, probes
backend = web(
image=image("myapp:latest"),
port=8000,
probes=probes(liveness="/healthz", readiness="/ready"),
)