A natural language interface for Kubernetes operations
Project description
K8S-LLM
A command-line tool that allows users to interact with Kubernetes using natural language, powered by Large Language Models.
Features
- Natural language interface for Kubernetes commands
- Context-aware conversations
- Configurable LLM settings
- Command history and context management
Installation
git clone git@github.com:yexia553/k8sllm.git
cd k8sllm
pip install -r requirements.txt && pip install . e
Usage
# Ask a question
k8sllm -q "list all pods in the default namespace"
# Clear conversation context
k8sllm -c
You can also set alias to make usage easier.
alias qk8sllm='k8sllm -q'
alias ck8sllm='k8sllm -c'
After setting the above alias, you can directly use qk8sllm and ck8sllm.
# Ask a question
qk8sllm "List all pods in the default namespace"
# Clear conversation context
ck8sllm
Configuration
Create a .k8sllm/config.yaml file in your home directory with the following structure:
llm:
base_url: "https://api.deepseek.com/v1" # Change this to your LLM service URL
api_key: "your-api-key"
model: "deepseek-chat" # Change this to your model name
Any large model API compatible with the OpenAI SDK can be used. Personally, I recommend DeepSeek as it offers good performance, is cost-effective, and has a simple configuration.
Development
This project uses Python 3.8+ and requires the following main dependencies:
- click: For CLI interface
- pyyaml: For configuration management
- openai: For LLM integration
License
MIT License
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file k8sllm-0.1.0.tar.gz.
File metadata
- Download URL: k8sllm-0.1.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50b90abb84033430786868fcff26a92452ffe03c7553e8a9ac4f763dc91bf7c4
|
|
| MD5 |
746a10f595fe0cab3c27b2295ad6ac7c
|
|
| BLAKE2b-256 |
9575bb12f2b645f9e3ed0d8e0aa7400f1b0fe2a45be4f41f3c0a4b28dff67061
|
File details
Details for the file k8sllm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: k8sllm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9155824fd6a8f7e720b381fd6a74108f5ab02a1763047b6e0b70a7ec9a927889
|
|
| MD5 |
da111e56d330cd14a99e3251a5a52a49
|
|
| BLAKE2b-256 |
58faf6c115986f692c2910fbc2442772a4f99b364e1fac1f765463fc4121a38a
|