From the course: Kubernetes Step-by-Step by Pearson

Unlock this course with a free trial

Join today to access over 26,400 courses taught by industry experts.

Kubernetes troubleshooting

Kubernetes troubleshooting

“

Sometimes your application won't work immediately. Then you need to do some troubleshooting. So what can you do in order to troubleshoot? Well, it's smart to always start with kubectl get. That will give you an overview of all resources and a short summary of their current state. Next, you can further investigate the resource using kubectl describe. We have already seen it. kubectl describe is giving detailed information about the status and about recent Kubernetes cluster events. And if kubectl describe is showing any error, your error might be related to the application. And then kubectl logs is convenient. You can do that on failing pods. It's a command that you only do on a pod because it will query the pod for the logs that were generated by the the primary application that it is running. Because this primary application writes output, as well as errors, to the Kubernetes logs. Let me show you. So, I'm going to use kubectl create deploy mydb. Minus minus image is MariaDB. Before…

Contents