Fractal Techware

Alert runbooks /

KubePodCrashLooping

Pod container is crash looping. Free rule (MIT): the complete runbook and rule definition are below.

   
Severity warning
Pending (for:) 15m (warning)
Domain Kubernetes workloads
Requires kube-state-metrics v2.x
Rule file rules/kubernetes-workloads.rules.yml (group ftw.kubernetes-workloads.alerts)

Meaning

The container starts, exits and is restarted by the kubelet with an increasing back-off delay (up to 5 minutes). It has been waiting in CrashLoopBackOff for the whole pending period.

Impact

The pod never becomes Ready. If all replicas crash, the service is down; with some replicas crashing, capacity is reduced and rollouts are blocked.

Diagnosis

Mitigation

Escalation

Route to the team that owns the namespace. Platform on-call only takes over when several namespaces are affected at once (likely a node, network or control-plane problem).

Rule definition

From rules/kubernetes-workloads.rules.yml in the free repository (MIT). Unit tests for it are in tests/.

- alert: KubePodCrashLooping
  expr: max_over_time(kube_pod_container_status_waiting_reason{job="kube-state-metrics", namespace=~".+", reason="CrashLoopBackOff"}[5m]) >= 1
  for: 15m
  labels:
    severity: warning
  annotations:
    summary: Pod container is crash looping.
    description: Container {{ $labels.container }} in pod {{ $labels.namespace }}/{{ $labels.pod }} has been in CrashLoopBackOff for at least 15m.
    runbook_url: runbooks/kubernetes-workloads/KubePodCrashLooping.md