Skip to main content

KA-B010: Readiness probe port not in container ports

Warning Best Practice

Why This Matters

The readiness probe references a port that is not declared in the container ports array. This may indicate a misconfiguration where the probe points to the wrong port or the container port declaration is missing. The pod will never become ready, blocking traffic.

How to Fix

Ensure the readiness probe port matches a declared container port

Before (incorrect)

containers:
  - name: app
    ports:
      - containerPort: 8080
    readinessProbe:
      httpGet:
        port: 9090

After (correct)

containers:
  - name: app
    ports:
      - containerPort: 8080
    readinessProbe:
      httpGet:
        port: 8080

Rule Details

Rule Code
KA-B010
Severity
Warning
Category
Best Practice

Related Rules