{"id":13423992,"url":"https://github.com/robusta-dev/kubernetes-chatgpt-bot","last_synced_at":"2025-05-15T01:06:45.200Z","repository":{"id":65225860,"uuid":"587275399","full_name":"robusta-dev/kubernetes-chatgpt-bot","owner":"robusta-dev","description":"A ChatGPT bot for Kubernetes issues.","archived":false,"fork":false,"pushed_at":"2024-11-21T10:01:31.000Z","size":116,"stargazers_count":928,"open_issues_count":10,"forks_count":99,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-05-08T02:44:01.450Z","etag":null,"topics":["chatbot","chatgpt","kubernetes","prometheus","slack"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robusta-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-10T11:24:57.000Z","updated_at":"2025-04-22T19:41:45.000Z","dependencies_parsed_at":"2024-01-07T06:50:00.583Z","dependency_job_id":"4287b08a-41cf-4c53-a968-2a1f269b9b61","html_url":"https://github.com/robusta-dev/kubernetes-chatgpt-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robusta-dev%2Fkubernetes-chatgpt-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robusta-dev%2Fkubernetes-chatgpt-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robusta-dev%2Fkubernetes-chatgpt-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robusta-dev%2Fkubernetes-chatgpt-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robusta-dev","download_url":"https://codeload.github.com/robusta-dev/kubernetes-chatgpt-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254041,"owners_count":22039792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","chatgpt","kubernetes","prometheus","slack"],"created_at":"2024-07-31T00:00:46.305Z","updated_at":"2025-05-15T01:06:40.187Z","avatar_url":"https://github.com/robusta-dev.png","language":"Python","funding_links":[],"categories":["Uncategorized","Python","Bots","Chatbots","ChatGPT-based applications","精选开源项目合集","Thanks to all the contributors!"],"sub_categories":["Uncategorized","Examples","Other sdk/libraries","GPT插件","DevOps"],"readme":" ## 🚨The Kubernetes ChatGPT Bot project will be deprecated and replaced by [HolmesGPT](https://github.com/robusta-dev/holmesgpt), our advanced Open Source DevOps assistant. With Holmes you can investigate incidents, triage issues, enrich alerts and much more. Check it out [https://github.com/robusta-dev/holmesgpt](https://github.com/robusta-dev/holmesgpt)\n\n# Introduction\n\nA ChatGPT[^1] bot for Kubernetes issues. Ask the AI how to solve your Prometheus alerts, get pithy responses.\n\nNo more solving alerts alone in the darkness - the internet has your back.\n\n\u003ca href=\"https://www.loom.com/share/0f9db7b7013d46b0ac3afc590103a095\"\u003e\n    \u003cimg style=\"max-width:300px;\" src=\"https://cdn.loom.com/sessions/thumbnails/0f9db7b7013d46b0ac3afc590103a095-1676152572154-with-play.gif\"\u003e\n  \u003c/a\u003e\n  \nPlease consider upvoting on [Product Hunt](https://www.producthunt.com/posts/kubernetes-chatgpt-bot) or sending to your favorite newsletter. One day, Skynet will remember your kindness and spare you!\n\n# How it works\nPrometheus forwards alerts to the bot using a webhook receiver.\n\nThe bot sends a query to OpenAI, asking it how to fix your alerts.\n\nYou stockpile food in your pantry for the robot uprising.\n\nThe bot is implemented using [Robusta.dev](https://github.com/robusta-dev/robusta), an open source platform for responding to Kubernetes alerts. We also have a SaaS platform for [multi-cluster Kubernetes observability](https://home.robusta.dev/).\n\n# Prerequisites\n* A Slack workspace\n\n# Setup\n1. [Install Robusta with Helm](https://docs.robusta.dev/master/installation.html)\n2. Load the ChatGPT playbook. Add the following to `generated_values.yaml`: \n```\nplaybookRepos:\n  chatgpt_robusta_actions:\n    url: \"https://github.com/robusta-dev/kubernetes-chatgpt-bot.git\"\n\ncustomPlaybooks:\n# Add the 'Ask ChatGPT' button to all Prometheus alerts\n- triggers:\n  - on_prometheus_alert: {}\n  actions:\n  - chat_gpt_enricher: {}\n```\n\n3. Add your [OpenAI API key](https://beta.openai.com/account/api-keys) to `generated_values.yaml`. Make sure you edit the existing `globalConfig` section, don't add a duplicate section.\n\n```\nglobalConfig:\n  chat_gpt_token: YOUR KEY GOES HERE\n```\n\n4. Do a Helm upgrade to apply the new values: `helm upgrade robusta robusta/robusta --values=generated_values.yaml --set clusterName=\u003cYOUR_CLUSTER_NAME\u003e`\n\n5. [Send your Prometheus alerts to Robusta](https://docs.robusta.dev/master/user-guide/alert-manager.html). Alternatively, just use Robusta's bundled Prometheus stack.\n\n# Demo\nInstead of waiting around for a Prometheus alert, lets cause one.\n\n1. Deploy a broken pod that will be stuck in pending state:\n\n```\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/pending_pods/pending_pod_node_selector.yaml\n```\n\n2. Trigger a Prometheus alert immediately, skipping the normal delays:\n\n```\nrobusta playbooks trigger prometheus_alert alert_name=KubePodCrashLooping namespace=default pod_name=example-pod\n```\n\nAn alert will arrive in Slack with a button. Click the button to ask ChatGPT about the alert.\n\n# Future Improvements\nCan ChatGPT give better answers if you feed it pod logs or the output of `kubectl get events`?\n\n[Robusta](http://robusta.dev) already collects this data and attaches it to Prometheus alerts, so it should be easy to add. \n\nPRs are welcome!\n\n# Community\n[Share your funniest output and suggest new features on our Slack.](https://home.robusta.dev/slack)\n\n# Promotional Images\nFeel free to use the following image or create your own.\n\n![Screen Shot 2023-01-10 at 18 29 56](https://user-images.githubusercontent.com/494087/211615506-fb8ba31a-4569-4ab6-9504-f1e42457771e.png)\n\n# More Resources\n* [Natan tests ChatGPT on production Kubernetes alerts](https://www.youtube.com/watch?v=RVK6jb4Ssuo)\n* [Natan Yellin and Sid Palas go over the code on YouTube](https://www.youtube.com/watch?v=jMR8M3Xqlzg\n) - relevant part starts at 38:54\n\n[^1]: Technically this project doesn't use ChatGPT. It uses the `text-davinci-003` model which is a [GPT3.5-based sibling of ChatGPT](https://matt-rickard.ghost.io/gpt-lineage/). Given that most people are familiar with ChatGPT, but not `text-davinci-003` or GPT3.5, we've decided to keep the name \"ChatGPT bot\" despite the technical inaccuracy.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobusta-dev%2Fkubernetes-chatgpt-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobusta-dev%2Fkubernetes-chatgpt-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobusta-dev%2Fkubernetes-chatgpt-bot/lists"}