Deployment Has Non-Ready Pods
Identify why a deployment or statefulset has non-ready pods by locating the pod name and using kubectl describe to inspect the events.
This guide will help you to identify the issues related to non-ready pods.
Example Alert
CRITICAL Alert: Deployment cloud-connect has non-ready pods for longer than a 15m.CRITICAL Alert: StatefuleSet chi-test-test-0-0 has non-ready pods for longer than a 15m.
How to Identify the Issue?
If you receive an alert indicating that there are non-ready pods, follow these steps to identify the problem:
- Locate the Deployment Name:
The alert will contain the deployment name, which will help you identify the pod name. Refer to this section to know how to get the pod name. - Describe the Pod:
Use the following command to describe the pod and find the issue under the Events section:
kubectl describe pod <podname> -n <namespace>Once you identified the issue, you can further debug and find a solution.
How to Get the Pod Name?
Download the kubeconfig
Both of the steps below run against the environment's cluster, so start by downloading its Kubernetes credentials.
Using prompt
Download the Kubernetes credentials for environment <environment> in project <project>.or
Using command
raptor get kubeconfig -p <project> -e <environment> -o ./kubeconfigAdd --refresh if your existing credentials have expired.
New to the CLI? Install it first.
Navigate to the Environment Overview tab and click K8s Credentials to download the Kubernetes credentials.
Find the pod
-
Export the Kubernetes Configuration:
Use the following command to export the kubeconfig:export KUBECONFIG=~/path/to/<kubeconfig> -
Retrieve the Pod Name:
Run the following command to get the list of pods and identify the pod associated with the deployment name:kubectl get pods -n <namespace> | grep -i <deployment-name/statefulset-name>
After retrieving the pod name, refer to this section to describe the pod and identify the issue.
Troubleshooting
Step-by-step guides for recovering from common production issues such as non-ready pods, locked Terraform state, full PVCs, and Loki alerts.
Artifact History & Rollback
View the artifact history for a service in the Facets Control Plane and roll back to a previously registered image from the Resource Center.