ankitsquer49/smart-alert-handling-k8s — reverse-engineered prompt
Reverse engineered prompt
Build me a Python demo for an AI SRE assistant for Kubernetes.
I want one flow where Grafana sends an alert to a webhook, the app figures out the affected pod and namespace, pulls the logs, events, and manifest, asks GPT 4o for root cause analysis, then posts a helpful Slack message with suggested fixes. The Slack message should let me choose actions like apply a safe fix, open a GitHub PR, create a GitHub issue, or run a cluster scan.
I also want a second flow where I can type a Slack slash command like /agentic-scan, have it run K8sGPT, generate Kyverno policies with GPT 4o, avoid duplicate policies, validate them, and open a GitHub PR.
Use environment variables for Slack, OpenAI, GitHub, and Kubernetes access. Keep secrets out of git. Make it runnable locally first with clear setup steps and simple test commands. Look up current docs online if you need to.
Want more depth? Deep Reverse