Kubernetes troubleshooting with read-only cluster access
An agent inspects pods, events and logs to explain why a workload is failing and suggests fixes for an engineer to apply.
The use case
Kubernetes failures like CrashLoopBackOff, pending pods or failed probes take time to diagnose, especially for engineers who do not live in the cluster. Open-source tools HolmesGPT and K8sGPT read cluster state, events and logs and explain the likely cause in plain language with suggested fixes. Anthropic's data infrastructure team described using Claude Code to diagnose a cluster that stopped scheduling pods. Give these tools read-only access. An engineer still checks the explanation, applies fixes through the normal GitOps or change process, and keeps write access away from the agent.
Example workflow
- Install the tool with a read-only service account
- Point it at the failing namespace or workload
- Read the explanation and suggested fixes
- Verify with kubectl and logs
- Apply the fix through your usual deployment process
Tools
- HolmesGPT
- K8sGPT
- Claude Code
- Kubernetes
Risks and guardrails
- Never give the agent cluster-admin; use read-only roles
- Logs may contain secrets or personal data
- Suggestions can be outdated for your Kubernetes version
Sources
Written by Agents Lookup. Credits and official pages for the tools this use case names:
- HolmesGPT on GitHub: github.com/HolmesGPT/holmesgpt
- K8sGPT on GitHub: github.com/k8sgpt-ai/k8sgpt
- Claude: how Anthropic teams use Claude Code: claude.com/resources/articles/how-anthropic-teams-use-claude-code
- Kubernetes MCP Server (official page): claude.com/marketplace/connectors/kubernetes-mcp-server (checked 2026-11-19)