Kubernetes Copilot
Project description
Kubernetes Copilot
Kubernetes Copilot powered by OpenAI.
Status: Experimental
Caution: Copilot may generate and execute inappropriate operations, do not use in production environment!
Features:
- Automatically operate Kubernetes cluster based on prompt instructions.
- Human interactions on uncertain instructions to avoid inappropriate operations.
- Native kubectl and bash commands for accessing Kubernetes cluster.
- Web access and Google search support without leaving the terminal.
Install
Install the copilot with pip command below:
pip install kube-copilot
Setup
kubectl
should be installed in the local machine and kubeconfig file should be configured to access kubernetes cluster.trivy
should be installed to evaluate the security issues of container images (foraudit
command).- OpenAI API key should be set to
OPENAI_API_KEY
environment variable to enable the ChatGPT feature.OPENAI_API_BASE
should be set as well for Azure OpenAI service.
- Google search is not enabled by default. Set
GOOGLE_API_KEY
andGOOGLE_CSE_ID
if you want to enable it (get from here and here).
How to use
Usage: kube-copilot [OPTIONS] COMMAND [ARGS]...
Kubernetes Copilot powered by OpenAI
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
audit audit security issues for a Pod
diagnose diagnose problems for a Pod
execute execute operations based on prompt instructions
Audit Security Issues for Pod
kube-copilot audit POD [NAMESPACE]
will audit security issues for a Pod:
Usage: kube-copilot audit [OPTIONS] POD [NAMESPACE]
audit security issues for a Pod
Options:
--verbose Enable verbose information of copilot execution steps
--model TEXT OpenAI model to use for copilot execution, default is gpt-4
--help Show this message and exit.
Diagnose Problems for Pod
kube-copilot diagnose POD [NAMESPACE]
will diagnose problems for a Pod:
Usage: kube-copilot diagnose [OPTIONS] POD [NAMESPACE]
diagnose problems for a Pod
Options:
--verbose Enable verbose information of copilot execution steps
--model TEXT OpenAI model to use for copilot execution, default is gpt-4
--help Show this message and exit.
Execute Operations Based on Prompt Instructions
kube-copilot execute INSTRUCTIONS
will execute operations based on prompt instructions.
It could also be used to ask any questions.
Usage: kube-copilot execute [OPTIONS] INSTRUCTIONS
execute operations based on prompt instructions
Options:
--verbose Enable verbose information of copilot execution steps
--model TEXT OpenAI model to use for copilot execution, default is gpt-4
--help Show this message and exit.
Contribution
The project is opensource at github feiskyer/kube-copilot with Apache License.
If you would like to contribute to the project, please follow these guidelines:
- Fork the repository and clone it to your local machine.
- Create a new branch for your changes.
- Make your changes and commit them with a descriptive commit message.
- Push your changes to your forked repository.
- Open a pull request to the main repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for kube_copilot-0.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c900a1e922a148db522e5c433b14f3df26eebdec651c7e6b926ff284aa8b480 |
|
MD5 | 2662f0a8cc25a27c6f05325a877bd76f |
|
BLAKE2b-256 | 421771ca8748b3516181f6cfc048dba9dd3d48f30724301748826b16d52bdce8 |