Debugging Pods
SYSTEMATIC, DEBUGGING, FLOW, kuch, is, TARAH, hoti, hai: PEHLE, "kubectl get pods" se, OVERALL, STATUS, dekho, PHIR, "kubectl describe pod" se, Events, section, CHECK, karo, PHIR, "kubectl logs" se, application-level, ERRORS, dekho, aur, AGAR, ZAROORAT, ho, TO, "kubectl exec -it pod -- sh" se, ANDAR, jaakar, MANUALLY, INVESTIGATE, karo.
"kubectl get pod pod-name -o yaml" se, POORI, RAW, configuration, dekhi, ja, sakti, hai — kabhi-kabhi, YAML, mein, GALTI, (jaise, GALAT, env, var, naam) sirf, RAW, output, mein, hi, DIKHTI, hai.
kubectl get pods
kubectl describe pod my-pod
kubectl logs my-pod
kubectl exec -it my-pod -- sh
kubectl get pod my-pod -o yaml- Debugging flow: get pods -> describe -> logs -> exec (agar zaroorat ho)
- -o yaml se poori raw configuration dekhi ja sakti hai
- Har common failure state (ImagePullBackOff, CrashLoopBackOff) ka apna debugging path hai
"kubectl debug" command, se, EK, RUNNING, pod, mein, EK, TEMPORARY, "ephemeral, container" ADD, kiya, ja, sakta hai, DEBUGGING, TOOLS, ke, saath (jaise, curl, netstat) — USEFUL, hai, JAB, MAIN, container, ke, image, mein, KOI, debugging, tools, hi, NAHI, HAIN (jaise, distroless, images).
kubectl debug my-pod -it --image=busybox --target=main-containerAgar, pod, "Pending" mein, ATKA, hai, TO, "kubectl describe node" se, CHECK, karo, ki, KAHIN, KOI, node, mein, ENOUGH, CPU/memory, resources, NAHI, hain, — YE, EK, BAHUT, COMMON, "Pending" ka, REASON, hai.