Skip to content

Your AI-powered Kubernetes assistant Ask questions about Kubernetes directly from kubectl and get intelligent responses powered by Anthropic's AI. Simplify Kubernetes operations, troubleshooting, and learning with natural language queries.

License

Notifications You must be signed in to change notification settings

kemalcanbora/kube-alfred

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kube-Alfred

Kube-Alfred is an AI-powered assistant for Kubernetes. It allows you to ask questions about Kubernetes directly from kubectl, providing intelligent responses using the Anthropic API.

Installation

Using Krew

If you have Krew installed, you can easily install kube-alfred:

kubectl krew install alfred

Manual Installation

If you prefer to install manually:

  1. Download the appropriate version for your operating system and architecture from the releases page.
  2. Rename the downloaded file to kubectl-alfred.
  3. Make it executable: chmod +x kubectl-alfred
  4. Move it to a directory in your PATH, e.g., mv kubectl-alfred /usr/local/bin/

Testing plugin installation locally

kubectl krew install --manifest=alfred.yaml --archive=foo.tar.gz

Generate sha256

shasum -a 256 releases/download/<VERSION>/*.tar.gz

Usage

Once installed, you can use kube-alfred with the following commands:

Ask a question

kubectl alfred ask "<your question about Kubernetes>"

For example:

kubectl alfred ask "How do I create a deployment?"

Set API Key

To securely store your Anthropic API key in the system keyring:

kubectl alfred set-key <your-api-key>

Delete API Key

To remove your Anthropic API key from the system keyring:

kubectl alfred del-key

Configuration

Kube-Alfred now uses the system keyring to securely store your Anthropic API key. You only need to set it once using the set-key command as shown above.

Examples

Here are a few example questions you can ask:

kubectl alfred ask "What is a Pod in Kubernetes?"
kubectl alfred ask "How do I troubleshoot a failing deployment?"
kubectl alfred ask "Explain Kubernetes Services and their types"

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License

Support

If you encounter any issues or have questions, please file an issue on the GitHub repository.

Security Note

Kube-Alfred uses your system's keyring to store the Anthropic API key securely. This is generally more secure than storing it in plain text or environment variables. However, the security of the keyring depends on your operating system and its configuration. Always ensure you're following best practices for system security.

Output

Ekran-Resmi-2024-08-21-10-30-51.png

About

Your AI-powered Kubernetes assistant Ask questions about Kubernetes directly from kubectl and get intelligent responses powered by Anthropic's AI. Simplify Kubernetes operations, troubleshooting, and learning with natural language queries.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages