KA-B002: Missing CPU limits
Warning Best Practice
Why This Matters
The container does not define a CPU limit. Without CPU limits, the container can consume unlimited CPU on the node, potentially starving other workloads. CPU limits ensure fair resource sharing and prevent runaway processes from impacting co-located pods.
How to Fix
Add a CPU limit to the container resources
Before (incorrect)
containers:
- name: app
image: myapp:1.0
resources:
requests:
cpu: 100m After (correct)
containers:
- name: app
image: myapp:1.0
resources:
requests:
cpu: 100m
limits:
cpu: 500m Rule Details
- Rule Code
- KA-B002
- Severity
- Warning
- Category
- Best Practice