Sherlocks.ai guide: how to debug Kubernetes incidents with AI
Sherlocks.ai published a guide on 4 November for using AI chat assistants to debug Kubernetes incidents. Its main point: paste the full picture, not one error line. Give the pod description, recent events, the last 50 log lines and what changed in the past hour, then ask for three ranked causes. It also lists when AI wastes your time.
The guide starts from how an incident really goes. Someone spends the first ten minutes collecting the same things every time: the pod description, events, node state, logs and recent deploys. A model can read all of that at once and spot links faster than a person switching between tabs.
It works through one example. A pod keeps restarting. The deploy history shows a setting that cut a timeout from 30 seconds to 3 seconds at 14:32, and the health check began failing at 14:33. Leave the deploy history out of the prompt, the guide says, and no model finds that link.
It is just as clear about limits. Models do badly on bugs in your own application logic, on heavily customised clusters and on long chains of failures, and they invent a cause when given too little. The guide's defence is to ask for a confidence estimate and the evidence behind each answer.
It also says not to paste logs that hold secrets or customer data into a public chatbot. The last section describes tools that do this gathering automatically when an alert fires, including the company's own product.
New to this? The key idea
A language model only knows what you show it. During an incident the useful facts sit in several places: the pod's status, the event history, the logs and the list of recent changes. Giving it one error line is like telling a mechanic only that your car makes a noise. Giving it everything lets it link a change at 14:32 to a failure at 14:33.
Use it at work
Use it for: the first minutes of a Kubernetes incident, when the on-call engineer is collecting context. It suits infrastructure-shaped failures such as OOMKilled, ImagePullBackOff, failing probes and node pressure.
Try it: collect the inputs with the script from the guide, add what users are seeing and what changed in the last hour, then ask for the three most likely causes ranked by probability, what would confirm or rule out each, and the commands to check. End the prompt with "Do not guess if the data is not there."
NS=payments
POD=checkout-svc-7d9f4c-x2mkp
kubectl describe pod "$POD" -n "$NS"
kubectl get events -n "$NS" --sort-by='.lastTimestamp' | tail -30
NODE=$(kubectl get pod "$POD" -n "$NS" -o jsonpath='{.spec.nodeName}')
kubectl describe node "$NODE"
kubectl logs "$POD" -n "$NS" --tail=50
kubectl logs "$POD" -n "$NS" --previous --tail=50
kubectl get pod "$POD" -n "$NS" -o yaml
Before you roll it out: cost is whatever your chat assistant costs; the guide names no tool price. Everything you paste leaves your network, so scrub secrets and customer data first or use a model that runs inside your own network. Never let the model apply fixes on its own. The guide is written by a company that sells an AI SRE product, and its closing section points to that product.
Summaries are written by AI from the linked source. Always check the original.