More Info:
Verifies every container sets resources.requests so the scheduler can place the pod correctly and QoS is not BestEffort.Risk Level
LowAddress
SecurityCompliance Standards
- Cloudanix Best Practice
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List all non-exempt pods and identify offenders (run on any machine with kubectl access):
-
For a pod managed by a higher-level controller (Deployment/ReplicaSet/StatefulSet/DaemonSet/Job/CronJob), get and edit the owning object’s manifest (example for a Deployment; run on any machine with kubectl access):
Under each container in
spec.template.spec.containers, add or update:(Choose values appropriate for the application.) -
Apply the updated controller manifest (run on any machine with kubectl access):
Repeat steps 2–3 for other controller types (
kubectl get statefulset,kubectl get daemonset,kubectl get job,kubectl get cronjob) that own non-compliant pods. -
For stand-alone Pods (no controller ownerReference), edit the Pod spec directly (run on any machine with kubectl access):
In each
spec.containers[], ensure:Note: editing certain fields of a running Pod may be restricted; if so, recreate the Pod with a corrected manifest: -
For workloads managed by AKS add-ons or third-party operators, adjust their Helm chart values or operator configuration so that the generated Pod templates include
resources.requests.cpuandresources.requests.memoryfor all containers, then redeploy using the add-on’s/Helm’s normal process. -
Verify compliance for all pods (run on any machine with kubectl access):
The output should be
is_compliant=true.
Using kubectl
Using kubectl
On any machine with kubectl access:Focus on the owning workload (Deployment, StatefulSet, Job, etc.), not the pod itself.Adjust values to match application requirements. Do this for every container that currently lacks requests or has only one of CPU/memory.Repeat steps 2–4 for each affected controller type (e.g., Edit each container to add:Remove runtime-only fields before re-creating:
- Identify non-compliant pods and their controllers
- Export the owning workload manifest (example for a Deployment)
- Edit containers to add
resources.requests(CPU and memory) in the manifest
/tmp/deploy-with-requests.yaml, under each container in spec.template.spec.containers, ensure a block like:- Apply the updated manifest
kubectl get statefulset, kubectl get job, etc.).- For standalone Pods managed directly (no ownerReferences)
- Verification
is_compliant=true (or that it prints just is_compliant=true):Automation
Automation

