Kopylot is an open-source AI-powered Kubernetes assistant. Its goal is to help developers and DevOps engineers to easily manage and monitor their Kubernetes clusters.
You can read more about the project in the blog post.
-
🔍 Audit: Audit a resource, such as pods, deployments, or services using an LLM model.
-
🩺 Diagnose: Diagnose resources, such as pods, deployments, or services using an LLM model.
-
💬 Chat: Start a chat with kopylot to generate kubectl commands based on your prompts.
-
☸️ Ctl: A wrapper around kubectl. The arguments passed to the
ctl
subcommand are interpreted by kubectl.
- Requests an API key from OpenAI.
- Export the key using the following command:
export KOPYLOT_AUTH_TOKEN=your_api_key
- Install Kopylot using pip:
pip install kopylot
- Run Kopylot:
kopylot --help
Usage: kopylot [OPTIONS] COMMAND [ARGS]...
╭─ Options ──────────────────────────────────────────────────────────────────────────╮
│ --version │
│ --install-completion [bash|zsh|fish|powershell Install completion for the │
│ |pwsh] specified shell. │
│ [default: None] │
│ --show-completion [bash|zsh|fish|powershell Show completion for the │
│ |pwsh] specified shell, to copy it │
│ or customize the │
│ installation. │
│ [default: None] │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────╮
│ audit Audit a pod, deployment, or service using an LLM model. │
│ chat Start a chat with kopylot to generate kubectl commands based your │
│ inputs. │
│ ctl A wrapper around kubectl. The arguments passed to the ctl subcommand are │
│ interpreted by kubectl. │
│ diagnose Diagnose a resource e.g. pod, deployment, or service using an LLM model. │
╰────────────────────────────────────────────────────────────────────────────────────╯
Kopylot is an open-source project and we welcome contributions from the community. There are a couple of ways to set up your development environment and start contributing to the project.
KoPylot supports development using a dev container, which helps you set up a consistent and isolated environment for development. This makes it easy to get started without having to worry about conflicting dependencies or configurations on your local machine.
To get started with a dev container:
- Install Docker and Visual Studio Code.
- Install the Remote - Containers extension in Visual Studio Code.
- Clone the KoPylot repository and open the project folder in Visual Studio Code.
- Press
F1
, typeRemote-Containers: Reopen in Container
, and hitEnter
. Visual Studio Code will build the dev container and reopen the project inside it.
You're now ready to start contributing to KoPylot using the dev container!
If you prefer to set up your development environment locally, make sure you have Poetry installed on your system. Then, follow these steps:
-
Clone the KoPylot repository:
git clone https://github.com/avsthiago/kopylot
-
Navigate to the project folder:
cd kopylot
-
Install the project dependencies using Poetry:
make install
You're now ready to start contributing to KoPylot using your local setup! 😄
Before submitting a pull request, please make sure to test your changes and follow the project's coding guidelines. We appreciate your contributions and look forward to collaborating with you! 🎉
Kopylot is licensed under the MIT License. See LICENSE for more information.
If you have any questions or suggestions, feel free to contact me on https://thiagoalves.ai.
Thank you for using Kopylot! 🙌
- Wrap the kubectl command using
ctl
subcommand. - Create the
audit
subcommand to audit kubernetes resources. - Create the
diagnose
subcommand to diagnose kubernetes resources. - Create the
chat
subcommand to generate kubectl commands using from the user prompts. - Make it possible to use other LLM models, not just from OpenAI.
- Integrate LangChain into Kopylot to make it as autonomous as possible.
One of the similar projects that I found is the Kopilot from knight42. It is also a Kubernetes assistant which uses LLMs behind the scenes. The main difference from KoPylot is that it is written in Go. At the moment, it doesn't have the Chat command implemented, but it can respond in different languages.