More Info:
Advisory: long-running containers should define livenessProbe and readinessProbe so Kubernetes can restart hung pods and keep traffic off pods that are not ready.Risk Level
InformationalAddress
SecurityCompliance Standards
- Cloudanix Best Practice
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify offending pods and their owners (run on any machine with kubectl access):
-
For each non-compliant workload that is controlled by a higher-level object (e.g., Deployment, StatefulSet, DaemonSet), export its manifest for editing (run on any machine with kubectl access; replace values with those from step 1):
(Similarly use
statefulsetordaemonsetin place ofdeploymentas needed.) -
Edit the manifest to add
livenessProbeandreadinessProbefor each long-running container (run on the same machine where you saved the file):Underspec.template.spec.containers[]for each long-running container, add probes appropriate to the application, for example:Adjust paths, ports, and timings to match the container’s behavior. -
Apply the updated manifest so the controller recreates pods with probes (run on any machine with kubectl access):
Repeat steps 2–4 for each affected Deployment/StatefulSet/DaemonSet.
-
For any standalone Pod objects that you intentionally manage directly (no controller owner), edit and re-apply the Pod manifest (run on any machine with kubectl access):
Add
livenessProbeandreadinessProbeunderspec.containers[]as in step 3, then: -
Verify that all long-running containers now define both probes (run on any machine with kubectl access):
Using kubectl
Using kubectl
On any machine with kubectl access:Apply the updated manifest:Repeat for all affected controllers (Deployments, StatefulSets, DaemonSets, Jobs/CronJobs if they are long-running).Add
- Identify non-compliant pods and their controllers (Deployments, etc.):
- For each owning controller (example: Deployment
my-appin namespaceprod), export its manifest:
- Edit
/tmp/deploy-my-app.yamland addlivenessProbeandreadinessProbeto each long-running container. Example HTTP-based probes:
- If any pod is standalone (kind: Pod) and managed directly (not recommended in AKS), edit in place:
livenessProbe and readinessProbe under the container spec as shown above, then save and exit; the pod will be recreated if the spec changes in a controller, or updated in place for a bare pod.- Verification (any machine with kubectl access):
Automation
Automation

