Two CNCF-ecosystem tools cover the spectrum of AI-assisted cluster debugging, and this playbook installs both against a deliberately broken kind cluster.
Tier: Advanced · Hands-on time: ~60 minutes
The habit it builds carries over to production: kubectl remains the source of truth; the AI's output is a hypothesis to check, not a diagnosis to apply.
kubectl describe output is voluminous and the cause is non-obvious (image pulls, probes, quotas, affinity, PVC binding).Skip for failures where the first kubectl describe pod line already tells you the answer, and never let either tool apply anything — they diagnose; you change.
kind create cluster or minikube. Do NOT learn these tools pointed at production or a client cluster.brew install k8sgpt or release binary) and HolmesGPT (pipx install holmesgpt or its Helm chart for the in-cluster variant).Break the cluster on purpose. Apply your five broken manifests to distinct namespaces so each failure is isolated and you know ground truth for every one.
Run K8sGPT for the survey pass.
k8sgpt auth add --backend openai --model <model> # or ollama/localai backend
k8sgpt analyze --explain --filter Pod,Service,Deployment
Each finding pairs the analyzer's rule-based detection (trustworthy — it read real cluster state) with an LLM explanation and fix suggestion (unverified — audit it). Note which findings K8sGPT missed entirely: analyzers only catch coded patterns.
Verify each explanation against kubectl before believing it. For every finding: kubectl describe/kubectl get events --field-selector involvedObject.name=<pod> and confirm the quoted reason exists verbatim (e.g. the OOMKilled state, the exact failed-probe message). The detection layer is reliable; the explanation layer can misattribute cause.
Escalate one failure to HolmesGPT for agentic RCA.
holmes ask "why is the pod <name> in namespace <ns> not becoming ready?"
Watch its tool-call transcript: which kubectl/log/Prometheus queries it chose. This transcript IS the citation trail — every claim in its conclusion should map to a command it actually ran and output it actually saw.
Audit the transcript, then apply the fix yourself. Re-run 2–3 of the exact commands from the transcript and compare outputs. Then write the corrected manifest with your own hands (or your code assistant), kubectl apply, and confirm recovery with kubectl get pods -w. Score each tool per breakage: correct cause? correct fix? anything invented?
K8sGPT's split — deterministic detection, LLM explanation — is the trust boundary in miniature. Trust the layer that read the cluster; audit the layer that wrote the prose.
k8sgpt analyze across hundreds of findings with --explain is slow and costly; filter by namespace/resource and triage the raw findings first.k8sgpt auth add --backend localai --baseurl http://ollama:11434/v1); no pod names, logs, or config leave the environment. HolmesGPT similarly accepts OpenAI-compatible local endpoints via LiteLLM.--anonymize flag masks resource names before they reach a hosted backend — use it when a hosted model is approved but naming is sensitive; verify the masking by reading the request payloads in a proxy first.Pod logs fed to HolmesGPT can contain customer PII and secrets printed by careless apps — a local model backend is the only variant that makes this a non-event.