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.
- 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.
Related agent uses
Use Cursor to make a custom invitation site
Fabio Zapata had Cursor assemble a local invitation site with motion, images, and page links, using prompts instead of hand-coding at first.
Let a background agent watch tasks and open PRs
A team keeps a server-based agent running so Cursor can monitor work and turn finished tasks into pull requests.
Turn saved bookmarks into quick demo builds
A daily bookmark check can feed Cursor a new tech idea and produce a prototype after approval.
Keep Cursor confined to a disposable dev environment
They used Cursor agent mode inside a throwaway container setup with extra approval checks so it could do real work without risking the host machine.
Build branch-isolated workspaces for coding agents
A developer used Cursor to create a macOS Electron app that keeps each coding agent in its own branch-specific workspace with a separate local IP.
Build Ansible with Cursor and keep lessons in CLAUDE.md
They used Cursor and Claude to write most Ansible code, while saving lessons and plans to files so the work could continue after compaction.