Botkube blog

Get Started with ChatGPT to Troubleshoot K8s with Botkube's Doctor Plugin

Jul 31, 2023
Maria Ashby
Developer Advocate

This Tutorial is about the new ChatGPT-powered Doctor plugin which allows for easy diagnosis and solution recommendations for Kubernetes troubleshooting.

Share on Twitter
Share on LinkedIn
Share on Reddit
Share on HackerNews
Copy URL

Table of Contents

Need Help Troubleshooting Your K8s Cluster?

Get started with Botkube Cloud

Discover the future of efficient Kubernetes troubleshooting with Botkube’s new [Doctor plug-in](! By leveraging ChatGPT's powerful capabilities, you can now troubleshoot your Kubernetes cluster with unparalleled ease and save valuable time in the process. Say goodbye to tedious and time-consuming tasks, as ChatGPT helps to automate much of the troubleshooting process, allowing you to concentrate on more critical aspects of your workflow. Moreover, ChatGPT's comprehensive analysis of your cluster configuration and resource utilization offers invaluable insights to optimize performance and cut down on costs. Real-time errors and recommendations enhance your troubleshooting experience, ensuring you're always up-to-date with the health of your cluster. Seamlessly integrated with major communication channels, Botkube empowers you to act swiftly on identified errors, keeping your Kubernetes environment running smoothly at all times.

Learn more about Botkube's ChatGPT-powered Doctor plugin in our [release announcement](

In this tutorial, we will walk you through the step-by-step process of setting up and utilizing Botkube's new [Doctor plug-in](, optimizing your team’s performance, and maximizing your Kubernetes productivity.

## Requirements

* A Slack workspace
* A [Botkube Cloud]( account
* [OpenAI credits [(

## Method 1: Install the Doctor Plug into a new instance

### Creating a Botkube Cloud Account

1. On the Botkube [homepage](, locate the “Get Started” button and click on it. This will take you to the account registration page.
2. Fill in the required information in the registration form. You can sign up with your email address or Github account.

* Click [here]( for a more indepth Botkube installation tutorial

### Connecting Kubernetes Cluster to Slack

1. Select either the Wizard or the Block builder method to initiate the setup process for Botkube's Cloud Slack integration.

Easy one click Kubernetes deployment for cloud

2. Next, enter your instance display name.

K8s cluster building GUI

3. Select the *Official Botkube Slack* option. (Note this option requires you to sign up for a 30 day free trial)

Official Slack Kubernetes bot

4. Access the app settings within Slack to configure the integration with Botkube. Click the "Add Slack" button to initiate the process.

5. Select the workspace within Slack where you want to utilize Botkube. Botkube will now have access to public and private channels, enabling seamless communication and collaboration for Kubernetes troubleshooting tasks.

Multicluster setup screen for Slack

6. To include Botkube in private channels, utilize the "Add to Channel" feature. This ensures that Botkube is present in relevant channels where Kubernetes-related discussions and incident responses take place.

One click slack sign in

7. Select the Plugins you would like to use. [Helm](, [kubectl](, and Kubernetes source are the Botkube default plug-ins. Select the [Doctor plug-in](

8. Navigate to the OpenAI website [here ]( and create your API key
9. Paste your API key into the empty box and press submit.

10. On the next page, you will have the option to also enable [Command Alias]( [Botkube Actions]( Make your selection and click the Create button.

11. You are now ready to start utilizing the Botkube Doctor plugin!

## Method 2: Install the Doctor plug-in into an already created Botkubeinstance.

### Creating your New Plug-In

1. Select the `Add Plug-in` button

2. Select the option for the Doctor plug-in

3. Navigate to the OpenAI website [here]( and create your API key
4. Paste your API key into the empty field and press Submit.

5. Select the Save button and refresh your browser.
6. Start interacting with your new Doctor Plug-in!

## Interactive Troubleshooting

When the Doctor AI detects an error or anomaly in the Kubernetes environment, it takes proactive steps to assist users in resolving the issue. Upon detecting an error event, the Doctor AI generates a Slack message with a `Get Help` button. Clicking on this button triggers the Doctor AI to provide users with actionable solutions and next steps to tackle the problem. This interactive troubleshooting approach empowers users with the knowledge and confidence to resolve Kubernetes issues swiftly.
## Support for Generic Questions

Beyond its ability to tackle specific errors, the Doctor AI is also well-versed in answering general questions related to Kubernetes. Users can seek guidance on various Kubernetes concepts, best practices, or configurations directly within the Slack channel. This means no more interruptions to access a separate dashboard or documentation, making it easier to gain quick insights and expand Kubernetes expertise.

## Scalable Plugin Pipelining

The Doctor AI plugin's versatility extends beyond standalone usage. It can be easily combined with other [Botkube plug-ins](, allowing users to create custom workflows tailored to their specific use cases. By pipelining the Doctor AI with other plugins, teams can orchestrate complex actions and integrations, further streamlining Kubernetes management processes.
## Conclusion

Botkube's new Doctor plug-in brings the future of efficient Kubernetes troubleshooting to your fingertips. With the power of ChatGPT, you can now effortlessly troubleshoot your Kubernetes cluster, saving precious time and streamlining your workflow. Bid farewell to tedious tasks, as ChatGPT automates much of the troubleshooting process, allowing you to focus on critical aspects of your work.

With seamless integration into [major communication channels](, Botkube empowers you to take swift action on identified errors, ensuring your Kubernetes environment runs smoothly wherever you are.  

### Sign up now

Whether you're a seasoned Kubernetes pro or just getting started, Botkube helps make troubleshooting Kubernetes easier and faster. [Sign up now for free]( and [join the community]( of users who are already benefiting from the power of Botkube.

## We'd Love Your Feedback

We welcome developers and Kubernetes enthusiasts to explore the platform and share their valuable feedback. We want to know what you think of Botkube and how we can make it even better. We're doing quick 15-minute interviews to get your feedback, and as a thank you, we'll give away cool Botkube plushies and t-shirts. Just email []( or [set up a meeting](

You can also talk to us in the Botkube GitHub [issues](, connect with others and get help in the [Botkube Slack community](, or email our Product Leader at [](