Troubleshooting applications
In this section, we’ll focus on troubleshooting containerized applications deployed on the Kubernetes cluster. This commonly covers issues with containerized-application-related Kubernetes objects, including pods, containers, services, and StatefulSets. The troubleshooting skill that you will learn in this section will be helpful throughout your CKA exam.
Getting a high-level view
To troubleshoot the application failures, we have to start by getting a high-level view. The following command is the best way to get all the information at once:
kubectl get pods --all-namespaces
Alternatively, we can use the following:
kubectl get pods -A
The following output shows the pods up and running per namespace, within which you can easily find which pods have failed:
Figure 9.21 – Listing pods per namespace
To get the most out of the output information, note the NAMESPACE
, READY
, and STATUS
columns –...