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
-
Identify noncompliant pods (any machine with kubectl access):
-
For pods managed by higher-level controllers (Deployment, StatefulSet, DaemonSet, Job, CronJob), edit the controller manifest to add requests (any machine with kubectl access). Example for a Deployment:
In each affected container under
spec.template.spec.containers[], ensure a block like:Save and exit to let Kubernetes roll out updated pods. -
For standalone Pods (no controller in
ownerReferences), edit the Pod spec directly (any machine with kubectl access). Note this recreates the pod:In/tmp/pod-POD_NAME.yaml, under eachspec.containers[], add:Remove ephemeral runtime fields (status,metadata.resourceVersion,metadata.uid,metadata.creationTimestamp,metadata.managedFields) and apply: -
If manifests are managed via GitOps or other IaC, make the same
resources.requests.cpuandresources.requests.memorychanges in the source YAML for each container, then let your deployment pipeline apply them. Do not rely onkubectl editfor these resources. - Repeat steps 2–4 for all listed noncompliant pods until every container in each pod has both CPU and memory requests defined.
-
Verify compliance (any machine with kubectl access):
Confirm the output is
is_compliant=trueor that all listed containers showis_compliant=true.
Using kubectl
Using kubectl
On any machine with kubectl access:Edit (Adjust values as appropriate for the application.)Apply the updated manifest:In Then:
- Identify non-compliant pods and their controllers
- For each workload controller (Deployment/DaemonSet/StatefulSet/Job/CronJob), edit the manifest and add
resources.requestsfor every container.
/tmp/deploy-with-requests.yaml and, for each container under spec.template.spec.containers, add:- For standalone Pods (no controller), recreate them with requests set.
/tmp/pod-with-requests.yaml:- Remove the entire
metadata.uid,metadata.resourceVersion,metadata.creationTimestamp,metadata.managedFields,statussections. - Under each
spec.containers[], add:
- Verification
Automation
Automation

