Skip to main content

KA-R001: Missing liveness probe

Warning Reliability

Why This Matters

The container does not define a livenessProbe. Without a liveness probe, Kubernetes cannot detect if the application has entered a broken state and will not restart it automatically.

How to Fix

Add a livenessProbe to the container spec

Before (incorrect)

containers:
  - name: app
    image: myapp:1.0

After (correct)

containers:
  - name: app
    image: myapp:1.0
    livenessProbe:
      httpGet:
        path: /healthz
        port: 8080
      initialDelaySeconds: 10
      periodSeconds: 15

Rule Details

Rule Code
KA-R001
Severity
Warning
Category
Reliability

Related Rules