Kubernetes troubleshooting toolkit - search pods by labels and execute diagnostic commands inside containers. Use when user reports service errors, exceptions, crashes, timeouts, or needs to check logs, processes, network, or resource usage in K8s pods.
npx skills add https://github.com/XiaoMi/mone --skill k8s-troubleshootInstala esta habilidad con la CLI y comienza a usar el flujo de trabajo SKILL.md en tu espacio de trabajo.
A complete toolkit for diagnosing Kubernetes applications. Find pods by labels, then execute commands inside containers for deep diagnostics.
Find pods by label selector:
uv run python .claude/skills/k8s-troubleshoot/scripts/search_pods.py -l "app=nginx" -n default
| Parameter | Required | Description |
|---|---|---|
-l, --label-selector |
Yes | Label selector, e.g., app=nginx or project-id=123,pipeline-id=456 |
-n, --namespace |
No | Namespace (default: default). Use all for all namespaces |
Output: JSON with success, podCount, pods (name, namespace, phase, containers)
Run diagnostic commands inside a container:
uv run python .claude/skills/k8s-troubleshoot/scripts/exec_pod.py -p "pod-name" -n default -cmd "tail -n 100 /root/logs/app.log"
| Parameter | Required | Description |
|---|---|---|
-p, --pod |
Yes | Pod name |
-n, --namespace |
No | Namespace (default: default) |
-c, --container |
No | Container name (for multi-container pods) |
-cmd, --command |
Yes | Command to execute |
Output: JSON with success, pod, namespace, command, output
uv run python .claude/skills/k8s-troubleshoot/scripts/exec_pod.py -p my-pod -n default -cmd "tail -n 100 /root/logs/app.log"
uv run python .claude/skills/k8s-troubleshoot/scripts/exec_pod.py -p my-pod -n default -cmd "cat /root/logs/nacos/config.log | grep nacos"
uv run python .claude/skills/k8s-troubleshoot/scripts/exec_pod.py -p my-pod -n default -cmd "ps aux | head -20"
uv run python .claude/skills/k8s-troubleshoot/scripts/exec_pod.py -p my-pod -n default -cmd "netstat -tlnp"
uv run python .claude/skills/k8s-troubleshoot/scripts/exec_pod.py -p my-pod -n default -cmd "df -h && free -m"
| Issue | Diagnostic Command |
|---|---|
| dubbo3 no provider | Check /root/logs/nacos/config.log for nacos address |
| Service not responding | Check process status with ps aux and logs |
| Connection issues | Check network with netstat -tlnp |
| OOM errors | Check memory with free -m |