---
title: "Probe every Kubernetes workload for · Agent Wranglers"
url: https://agentwranglers.se/playbook/infrastructure/containers-and-orchestration/kubernetes-probes
id: INF-78
level: Required
applies: servers
risk: outage
updated: 2026-10-27
build: a2a6bdfed830
tokens: 1073
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Probe every Kubernetes workload for readiness and liveness

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Containers and orchestration](https://agentwranglers.se/playbook/infrastructure/containers-and-orchestration.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: INF-78
- Level: Required
- Chapter: [Containers and orchestration](https://agentwranglers.se/playbook/infrastructure/containers-and-orchestration.md)
- Rule: Give every container that serves traffic a readiness probe on the app's ready check and a liveness probe on its trivial alive check. Add a startup probe when start takes longer than 10 seconds.
- Check: A policy check on the manifests fails any Deployment or StatefulSet container with a port and no readiness or liveness probe. On staging, stopping the database marks pods not ready, and no pod restarts.
- Risk: The app down or unusable
- Applies when: The project runs its own servers, virtual machines or containers.
- How: Without a readiness probe, Kubernetes sends traffic to a pod as soon as its process starts, so every deploy drops requests. A liveness probe that calls the database restarts every pod when the database is slow, which turns a slow database into a full outage. So the liveness probe asks only whether the process answers, and the readiness probe checks what the pod needs to serve. A startup probe holds the other probes back until the app has started, so a slow start is not killed in a loop. The two checks are defined in [Separate alive from ready](https://agentwranglers.se/playbook/engineering/build-test-and-deploy/health-check-and-rollback.md). Plain Docker reads the image's own check instead, as [Declare a health check in the image](https://agentwranglers.se/playbook/operations/containers/container-health.md) says.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### YAML example

```yaml
containers:
  - name: shop
    image: registry.example.com/shop:1.42.0@sha256:<digest>
    ports: [{ containerPort: 8080 }]
    startupProbe:
      httpGet: { path: /healthz, port: 8080 }
      failureThreshold: 30
      periodSeconds: 2
    livenessProbe:
      httpGet: { path: /healthz, port: 8080 }
      periodSeconds: 10
    readinessProbe:
      httpGet: { path: /readyz, port: 8080 }
      periodSeconds: 5
```

### Shell example

```sh
# Lists every container in the cluster without a readiness or liveness probe. Expect no output.
kubectl get deploy,statefulset -A -o json | jq -r '.items[] | .metadata.namespace + "/" + .metadata.name as $n
  | .spec.template.spec.containers[] | select(.readinessProbe == null or .livenessProbe == null) | $n + " " + .name'
```

## Sources

- [Kubernetes, Liveness, readiness and startup probes](https://kubernetes.io/docs/concepts/configuration/liveness-readiness-startup-probes/)

## Related rules

- ENG-9 [Give the server a health check](https://agentwranglers.se/playbook/engineering/build-test-and-deploy/health-check-and-rollback.md) in Engineering
- OPS-59 [Declare a health check in the image](https://agentwranglers.se/playbook/operations/containers/container-health.md) in Operations and observability

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/infrastructure/containers-and-orchestration/kubernetes-probes">Agent Wranglers infrastructure and environments playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Put each container only on the networks it needs](https://agentwranglers.se/playbook/infrastructure/containers-and-orchestration/container-networks.md)
- Next: [Set resource requests and a memory limit on every container](https://agentwranglers.se/playbook/infrastructure/containers-and-orchestration/kubernetes-requests-and-limits.md)
- [Containers and orchestration](https://agentwranglers.se/playbook/infrastructure/containers-and-orchestration.md)
