top of page

K8s Anti-Design Pattern Series - Kubectl debugging - Blog #19

Updated: Apr 12, 2023


Since we're already discussing kubectl's shortcomings, let's talk about its second largest one. You shouldn't try to use Kubectl as if it were a debugging utility. Inevitably, the "10-questions-game" with kubectl will arise for any business that has begun implementing Kubernetes. The first thing you should not do if there is a serious issue in your production cluster is to open a terminal and run kubectl. If you are doing this at 3 a.m. when output is down and you are on call, you have already lost.

kubectl get ns

kubectl get pods -n sales

kubectl describe pod prod-app-1233445 -n sales

kubectl get svc - n sales

kubectl describe...

You need to implement effective monitoring, tracing, and logging systems across all of your Kubernetes instances so that problems can be located promptly. You should add whatever it is you need to examine with kubectl to your monitoring tools if you find yourself running kubectl to check on it.A specialized instrument should be used even for a simple inspection of a cluster with which you are unfamiliar. Today, a wide variety of Kubernetes cluster inspection instruments are available.

Continuous Blog Series :

bottom of page