Kubernetes debugging and troubleshooting best practices using MCP kubernetes tools. Use when: (1) Pods are failing, pending, or in CrashLoopBackOff/ImagePullBackOff states, (2) Services are unreachable or DNS resolution fails, (3) Deployments aren't rolling out, (4) Nodes are unhealthy or unschedulable, (5) Resource issues (OOM, CPU throttling), (6) Any "why isn't my Kubernetes workload working?" questions. Provides systematic debugging workflows using kubectl_get, kubectl_describe, kubectl_logs, exec_in_pod, and other MCP kubernetes tools.
View on GitHubrodrigodelmonte/k8s-debugging-plugin
k8s-debugging-plugin
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/rodrigodelmonte/k8s-debugging-plugin/blob/main/skills/kubernetes-debugger/SKILL.md -a claude-code --skill kubernetes-debuggerInstallation paths:
.claude/skills/kubernetes-debugger/# Kubernetes Debugger
Systematic debugging workflows for Kubernetes issues using MCP kubernetes tools.
## Prerequisites
### Install Kubernetes MCP Server
```bash
claude mcp add kubernetes --scope user -- npx mcp-server-kubernetes
```
**Requirements:**
- Access to a Kubernetes cluster configured for kubectl (minikube, Rancher Desktop, GKE, EKS, AKS, etc.)
- kubeconfig at `~/.kube/config` (default) or `KUBECONFIG` env var set
- Helm v3 in PATH (optional, for Helm operations)
**Alternative installation methods:**
```bash
# Global install
npm install -g mcp-server-kubernetes
# Or run directly with npx (no install)
npx mcp-server-kubernetes
```
**Verify installation:**
```bash
claude mcp list # Should show 'kubernetes' server
```
## Quick Reference: MCP Tools
| Tool | Use For |
|------|---------|
| `kubectl_get` | List resources, check status, find resource names |
| `kubectl_describe` | Detailed info, events, conditions |
| `kubectl_logs` | Container stdout/stderr, application errors |
| `exec_in_pod` | Run commands inside containers |
| `kubectl_rollout` | Deployment rollout status/history |
| `node_management` | Cordon/drain/uncordon nodes |
## Debugging Decision Tree
```
Issue reported
│
├─ Pod not running? ──────────► See: Pod Debugging Workflow
│
├─ Service unreachable? ──────► See: Service/Network Debugging
│
├─ Deployment stuck? ─────────► See: Deployment Debugging
│
├─ Node issues? ──────────────► See: Node Debugging
│
└─ Performance/Resources? ────► See: Resource Debugging
```
## Pod Debugging Workflow
### Step 1: Get Pod Status
```
kubectl_get(resourceType="pods", namespace="<ns>")
```
Common statuses and their meaning:
- **Pending**: Scheduling issues (resources, node selector, affinity)
- **CrashLoopBackOff**: Container crashing repeatedly
- **ImagePullBackOff/ErrImagePull**: Cannot pull container image
- **Running** but not ready: Readiness probe failing
- **Terminating**: Stuck deletion (finalizers,