Back to list
mhalder

k8s-troubleshoot

by mhalder

Modular Linux development environment dotfiles managed with tuckr, featuring shell configurations, development tools, and automated installation hooks

1🍴 0📅 Jan 24, 2026

SKILL.md


name: k8s-troubleshoot description: Debug Kubernetes pods, services, and cluster issues. Use when the user says "pod not starting", "CrashLoopBackOff", "service not reachable", "kubectl debug", "pod stuck pending", or asks about Kubernetes problems. allowed-tools: Bash, Read, Grep

Kubernetes Troubleshoot

Debug pods, services, deployments, and networking issues in Kubernetes.

Instructions

  1. Identify the affected resource (pod, service, deployment)
  2. Get current state with kubectl get and kubectl describe
  3. Check logs if applicable
  4. Diagnose based on status/events
  5. Provide specific remediation steps

Diagnostic commands

# Pod debugging
kubectl get pods -o wide
kubectl describe pod <pod>
kubectl logs <pod> [--previous] [-c container]
kubectl get events --sort-by=.lastTimestamp

# Service/networking
kubectl get svc,endpoints
kubectl describe svc <service>
kubectl get ingress

# Resource issues
kubectl top pods
kubectl describe node <node> | grep -A5 "Allocated resources"

# Debug pod (ephemeral container)
kubectl debug -it <pod> --image=busybox --target=<container>

Common issues

StatusCauseSolution
PendingNo resourcesCheck node capacity, resource requests
PendingNo matching nodeCheck nodeSelector, taints/tolerations
ImagePullBackOffBad image/authVerify image name, imagePullSecrets
CrashLoopBackOffApp crashingCheck logs, entrypoint, health probes
CreateContainerConfigErrorBad configmap/secretVerify referenced configs exist
EvictedNode pressureCheck node conditions, resource limits

Service not reachable checklist

  1. Pod running? kubectl get pods -l app=<app>
  2. Pod ready? Check readiness probe
  3. Endpoints exist? kubectl get endpoints <svc>
  4. Service selector matches pod labels?
  5. Port/targetPort correct?
  6. NetworkPolicy blocking traffic?

Rules

  • MUST check events with kubectl describe before diagnosing
  • MUST check logs for CrashLoopBackOff
  • Never delete pods/resources without user approval
  • Never apply changes without showing the diff first
  • Always specify namespace if not default: -n <namespace>

Score

Total Score

70/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon