What this thread does
The problem
A pod crash-loops or a deployment will not roll out, and you are pasting kubectl describe and kubectl logs output into your agent by hand. Or you would like the agent to look at the cluster itself but do not want to give it your admin kubeconfig.
What the source says
An r/kubernetes thread (posted 8 October 2026 by u/royLskyhook, who says he works on the open source Radar tool) asked who actually uses agents to debug Kubernetes incidents in production. Several readable replies describe the same shape; the post body is marked [removed]. These are the commenters' own reports; I have not run any of it.
- Read-only cluster access. One reply gives the harness (Claude Code, Codex or similar)
kubectl, read-only access to the cluster and the observability platform via MCP, and asks it to troubleshoot. Others describe dedicated read-only roles for the agent, or a read-only RBAC operator that only opens pull requests. - Changes go through GitOps. The agent writes its investigation to a markdown file that people review; a second step makes the change through the same Git and deploy path a human would use, "The agent gets to be wrong cheaply" (a commenter). Another team connects all its agents to a cluster-context MCP in production but allows no writes through it.
- Context beats a wrapper. One reply says you do not need an "AI SRE" product, only instructions for how to troubleshoot plus access to the telemetry; the maker agreed that context mattered more than the wrapper. A commenter running the same pattern says wrapper products were a pain to set up and limited in what they could do, and prefers reusable triage instructions for the model.
- Scheduled sweeps. A homelab user runs a daily Claude Code routine that scans node and pod status, metrics, events and logs and writes a report; he still acts on it manually.
- Records. One reply wants a record of which queries the agent ran and what it saw when it decided, because postmortems of agent-assisted incidents otherwise end at "why did it think that".
One concrete way to set up the read-only part
The official docs of the open source Kubernetes MCP server (Apache-2.0, containers org) walk through it:
1. Create a ServiceAccount and bind it to the built-in view ClusterRole using a ClusterRoleBinding (cluster-wide) or a RoleBinding (one namespace). Kubernetes' own view role does not include Secrets, which is what you want here. 2. Mint a short-lived token (kubectl create token ... --duration=2h) and put it in a dedicated kubeconfig file, so your admin credentials never sit in the agent's environment. 3. Point the MCP server at that kubeconfig and set read_only = true in its TOML config. The same docs list optional toolsets for Loki logs and Prometheus metrics. 4. Check the grant with kubectl auth can-i list pods --as=system:serviceaccount:<ns>:<name> and confirm delete and get secrets answer no.
How to describe it to your agent
Investigate why<deployment>in<namespace>is unhealthy. You have read-only access: use get, describe, events, logs (including --previous) and the metrics tools. Write findings and a proposed manifest change toinvestigation.md. Do not apply anything; I will open the pull request.
Mistakes to check
- Binding the agent to
cluster-admin"just for debugging", or reusing your own kubeconfig context. - Letting the agent run
kubectl applyoreditagainst a GitOps-managed cluster: the next sync reverts it, and the change has no review. - Raw event streams are noisy (a maker reply says many events had already recovered); ask for "what is still broken and what changed recently" first.
- Pods that look healthy while the app is broken: a maker reply about a 50-fault comparison said AWS DevOps Agent struggled more on those than on crash loops (vendor benchmark, grain of salt).
Limits
Not run by me. The thread is a mix of practitioners and vendors (the maker of Radar and a representative of another tool both promote their products in it). Where a related thread covers gating Terraform changes, the same read-only-plus-review idea applies to infrastructure code.
Sources
Primary sources for the setup part: Kubernetes RBAC documentation, kubectl create token and the kubernetes-mcp-server README (checked 18 October 2026).
- Confirmed: the built-in
viewClusterRole is read-only and the docs say it does not allow viewing Secrets; a RoleBinding limits a ClusterRole to one namespace while a ClusterRoleBinding is cluster-wide;kubectl create tokentakes--duration(a request, the server may return a different lifetime); the MCP server'sread_only = trueis a TOML setting (the README says runtime settings are TOML, not CLI flags), it takes a kubeconfig, is Apache-2.0, and has optional Loki-logs and Prometheus-metrics toolsets that are off by default. - Read via the public RSS copy on 2026-11-14: the title and author/date are visible, but the post body is [removed]. Readable comments by sigmoia, Forsaken_Parfait_185, BrockWeekley and itsjakerobb support the read-only investigation, GitOps review, production no-write setup, records and daily sweep reports. royLskyhook's comments identify Radar as open source, describe recovered events and report the 50-fault comparison; the benchmark itself was not opened. This comment list may be a subset.
- Re-read on 2026-11-14: the Kubernetes RBAC and token pages and the Kubernetes MCP server README support the setup steps. The README describes
read_onlyas a best-effort guardrail and Kubernetes RBAC as the access control to rely on.
Started from a post by @royLskyhook, packaged by the editor. Original post