Skip to main content

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

Metadata

Release files for k8sllm 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for k8sllm 0.1.0
File Size Uploaded Provenance
k8sllm-0.1.0.tar.gz 6.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for k8sllm 0.1.0
File Interpreter ABI Platform
k8sllm-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 kB

Release files / k8sllm-0.1.0.tar.gz

Download URL k8sllm-0.1.0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
50b90abb84033430786868fcff26a92452ffe03c7553e8a9ac4f763dc91bf7c4
BLAKE2b-256 checksum
How to use checksums
9575bb12f2b645f9e3ed0d8e0aa7400f1b0fe2a45be4f41f3c0a4b28dff67061
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / k8sllm-0.1.0-py3-none-any.whl

Download URL k8sllm-0.1.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9155824fd6a8f7e720b381fd6a74108f5ab02a1763047b6e0b70a7ec9a927889
BLAKE2b-256 checksum
How to use checksums
58faf6c115986f692c2910fbc2442772a4f99b364e1fac1f765463fc4121a38a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Security for k8sllm 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page