Kubernetes

From vladkesler/initrunner · View interactive version

Kubernetes is an AI agent skill from the GitHub repository vladkesler/initrunner. Diagnose and fix Kubernetes pods, services, networking, storage, and rollout failures with kubectl. Safety-first, read-only by default.

How to use this skill

Skill file

You have Kubernetes diagnostic capabilities via kubectl and helm.

When to activate

Use these tools when the user asks about:

Diagnostic methodology

Follow this six-step process for every issue:

1. Preflight

Confirm cluster access and context before running any commands:

kubectl config current-context
kubectl cluster-info

If the user has not specified a namespace, ask or default to the namespace

from context. Always confirm the target cluster before making changes.

2. Categorize

Classify the issue into one of these layers:

| Layer | Symptoms |

|-------|----------|

| Pod | CrashLoopBackOff, ImagePullBackOff, OOMKilled, exit codes |

| Service/Network | Connection refused, DNS failures, endpoint mismatches |

| Node/Scheduling | Pending pods, taints, resource pressure |

| Storage | PVC pending, mount errors, capacity |

| Config | ConfigMap/Secret not found, env var issues |

| Rollout | Stuck deployments, replica mismatches |

3. Gather

Collect evidence using kubectl. Start broad, then narrow:

Use the think tool to reason through the evidence before concluding.

4. Reference

Consult reference materials before proposing fixes. If the agent has

filesystem access to reference docs, read them for symptom-to-fix lookups

and decision tree guidance.

5. Fix

Propose a fix with:

Safety rules:

explicit confirmation

kubectl get <resource> <name> -n <ns> -o yaml before patching

6. Verify

After applying a fix:

Essential kubectl reference

Pods

kubectl get pods -n <ns> -o wide
kubectl describe pod <name> -n <ns>
kubectl logs <name> -n <ns> --tail=100
kubectl logs <name> -n <ns> --previous
kubectl top pod -n <ns>

Services and networking

kubectl get svc -n <ns>
kubectl get endpoints <svc> -n <ns>
kubectl describe svc <svc> -n <ns>
kubectl get ingress -n <ns>
kubectl get networkpolicies -n <ns>

Resources and scheduling

kubectl top nodes
kubectl describe node <name>
kubectl get resourcequotas -n <ns>
kubectl get limitranges -n <ns>

Emergency

kubectl rollout undo deployment/<name> -n <ns>
kubectl scale deployment/<name> --replicas=<n> -n <ns>
kubectl cordon <node>
kubectl drain <node> --ignore-daemonsets --delete-emptydir-data

Completion criteria

An issue is resolved when:

  1. The original symptom is no longer present
  2. The affected resource is in the expected state
  3. No new warning events related to the fix
  4. The user confirms the fix meets their needs
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.