Debugging kubernetes cluster part 2
Debugging a Kubernetes cluster requires a deep understanding of its components and interdependencies. Here’s a comprehensive Part 2 guide focusing on advanced debugging techniques for common cluster issues: 1. Node Issues A. Node Not Ready Check Node Status :bash kubectl get nodes kubectl describe node <node-name> Inspect Kubelet Logs : SSH into the node and review logs for errors:bash journalctl -u kubelet -l Possible Causes : Resource exhaustion (e.g., CPU, memory, disk). Misconfigured networking (e.g., unable to reach the API server). Issues with container runtime (Docker, containerd). B. Node Disk Pressure or Memory Pressure Check Allocations :bash kubectl describe node <node-name> | grep Allocated Clean Up Disk Space : Remove unused images and logs:bash docker system prune Reconfigure Resource Limits : Adjust resource requests and limits for pods. 2. Pod Issues A. Pod Stuck in Pending Inspect Events :bash kubectl describe pod <pod-name> Possible Causes : Insuffi...