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
-
On any machine with kubectl access, list all non-compliant containers (those without CPU or memory requests):
-
For each affected Pod, identify whether it is controlled by a higher-level object (Deployment, DaemonSet, StatefulSet, Job, CronJob, etc.):
- If there is an ownerReference, you must edit the owner (e.g., Deployment), not the Pod.
- If there is no ownerReference, edit the Pod directly.
-
For Pods controlled by a higher-level controller (example: Deployment), edit the controller spec and add CPU and memory requests for each container:
In the opened manifest, under each
spec.template.spec.containers[].resources, ensure something like:Save and exit; the controller will roll out new Pods with the defined requests. -
For standalone Pods (no ownerReference), patch them to add CPU and memory requests for a specific container (repeat per container as needed):
Adjust the container index in
/spec/containers/0/...and request values as appropriate for your workload. -
For workloads managed via manifests/IaC (e.g., GitOps, Helm, Terraform), locate and edit the source manifest instead of using
kubectl edit, then apply:Ensure each container spec in the source includesresources.requests.cpuandresources.requests.memorybefore applying. -
Verification (on any machine with kubectl access): after changes roll out, rerun the compliance check and confirm
is_compliant=trueor no rows withis_compliant=false:Confirm that all listed containers show non-unsetrequestsCpuandrequestsMemoryandis_compliant=true.
Using kubectl
Using kubectl
On any machine with kubectl access:This lists unique Edit Apply the updated manifest:Repeat these steps for each non‑compliant controller kind (Deployment, StatefulSet, DaemonSet, Job, CronJob, etc.). For standalone Pods you manage directly, export/edit/apply similarly:Confirm either
- Identify non‑compliant pods and their controllers
<namespace> <ownerKind> <ownerName> you need to edit (e.g. default Deployment myapp).- Export the controller manifest, add requests, and re‑apply
myapp in namespace default:myapp-patched.yaml and, under each container, add resources.requests.cpu and resources.requests.memory if missing, for example:- Verify remediation
is_compliant=true overall or that all listed containers now show non‑unset requestsCpu and requestsMemory with is_compliant=true.Automation
Automation

