More Info:
Verifies pods are owned by a controller (Deployment, StatefulSet, DaemonSet, Job). A naked pod is not rescheduled if its node dies.Risk Level
LowAddress
SecurityCompliance Standards
- Cloudanix Best Practice
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify all naked pods (run on any machine with kubectl access):
-
For each naked pod, export its manifest so you can base a controller on it (replace NAMESPACE and PODNAME; run on any machine with kubectl access):
-
Create an appropriate controller manifest from the pod spec (run on any machine with kubectl access; edit locally with your editor):
- For stateless workloads, convert to a Deployment:
Then create
PODNAME-deploy.yamlwith content like:Now paste the contents ofPODNAME-pod-spec.yamlunder thespec:line above (indented two spaces) and adjust labels, selectors, and any fields that must be unique (for example, removenodeNameif you don’t want pinning). - For workloads that must run on every node, build a DaemonSet instead by changing
kind: Deploymenttokind: DaemonSetand removing thereplicas:field. - For stateful or single-instance workloads that need stable identities, use
kind: StatefulSetand add aserviceNameand volumeClaimTemplates as appropriate.
- For stateless workloads, convert to a Deployment:
-
Apply the new controller to the cluster (run on any machine with kubectl access):
Wait for the new managed pod(s) to be ready:
-
Once the controller-managed pod is running and serving traffic, delete the original naked pod (run on any machine with kubectl access):
If the pod was fronted by a Service, confirm the Service’s selector matches the labels used by the controller (for example,
app=PODNAME): -
Verify no remaining naked pods exist (run on any machine with kubectl access):
Confirm that either the output is
is_compliant=trueor that no lines containis_compliant=false.
Using kubectl
Using kubectl
On any machine with kubectl access:Apply it:Apply it:
- Identify “naked” pods (no controller ownerReference) outside system namespaces:
- For each listed pod, export its spec to base a controller on (example for namespace
app-namespace, podmy-app-pod):
- Create a matching controller manifest. For a typical stateless app, prefer a Deployment. Strip pod fields that must not be templated (status, metadata.uid, resourceVersion, etc.) and wrap
specundertemplate. Exampledeployment-my-app.yaml:
- If the naked pod is a singleton system-style agent that should run on all nodes, instead create a DaemonSet. Example
daemonset-my-agent.yaml:
- After the new controller-created pods are running and traffic is confirmed, delete the original naked pod(s), one at a time, by name:
- Repeat steps 2–5 for each naked pod, choosing Deployment/StatefulSet/DaemonSet/Job as appropriate to the workload semantics (stateful storage, one-shot jobs, per-node agents).
- Verification (same audit as the check, run after all conversions):
Automation
Automation

