Use Cursor to inspect pod logs and fix compose files

A DevOps engineer used Cursor to read production pod logs through Kubernetes MCP and to repair a broken Docker Compose setup.

Done with Cursor· Intermediate

What they did
Rajesh Sood connected Cursor to a Kubernetes MCP, then asked it in plain language for the logs from a specific production pod. Cursor fetched the logs and proposed fixes without him opening kubectl. For a broken docker-compose.yml, he enabled automatic command execution and told the agent to keep running compose checks until the errors were gone.
How it went
The compose file kept getting revised by the agent until a dry run finally passed. For the pod-log troubleshooting, the article does not give a sample log or a named fix.
Tips
He recommends keeping .env files out of Cursor’s reach if you do not want it to surface secrets. He also suggests committing frequently, since agent edits can still break things.

Try it yourself with Cursor

Connect to my Kubernetes cluster through MCP and fetch the recent logs for [pod or deployment name]. Explain what looks wrong and suggest a fix. Then inspect my docker-compose.yml for errors, propose a corrected version, and show me the diff. Pause and ask for my approval before you apply, save, send, submit, delete, or run anything that would change files or affect services.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.