CKAD Agent
A powerful AI-powered agent. This tool leverages large language models to help you understand, debug, and generate Kubernetes configurations.
Features
- 🐛 Debug Kubernetes YAML manifests
- 📚 Explain Kubernetes concepts and best practices
- ✨ Generate valid Kubernetes YAML from requirements
- ✅ Validate and improve existing configurations
Installation
-
Install the package:
pip install ckad-agent
-
Create a
.envfile with your OpenAI API key:cp .env.example .env # Edit .env and add your OpenAI API key
Usage
Command Line Interface
The CKAD Agent provides a convenient CLI for common tasks:
# Debug issues in read-only mode
ckad debug "My pod in namespace default keeps crashing, fix it" --read-only
# Debug and correct issues (Project in development be carefull, do not use it in production environment)
ckad debug "My pod in namespace default keeps crashing, fix it" --no-read-only
# Explain a Kubernetes concept
ckad explain "How do I configure liveness and readiness probes?"
# Validate a YAML file
ckad validate deployment.yaml --resource Deployment
Python API
from ckad_agent import CkadAgent, CKADRequest, TaskType, KubernetesResourceType
import asyncio
async def main():
agent = CkadAgent()
# Example: Debug a YAML
request = CKADRequest(
task_type=TaskType.DEBUG,
resource_type=KubernetesResourceType.POD,
yaml_content="""
apiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
containers:
- name: nginx
image: nginx:latest
""",
question="Why isn't this pod starting?"
)
response = await agent.process_request(request)
print(response.solution)
asyncio.run(main())
Development with uv
Prerequisites
- Install
uv(if not already installed):curl -LsSf https://astral.sh/uv/install.sh | sh
Or install via pip:pip install uv
Setup and Development
- Clone the repository
- Create and activate a virtual environment:
uv venv source .venv/bin/activate # On macOS/Linux # .\.venv\Scripts\activate # On Windows
- Install the package in development mode with all dependencies:
uv pip install -e ".[dev]"
- Run tests:
pytest
License
MIT
Metadata
Release files for ckad-agent 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ckad_agent-0.3.0.tar.gz | 13.2 kB | Without provenance | Details for ckad_agent-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ckad_agent-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for ckad_agent-0.3.0-py3-none-any.whl |
Total release size: 26.6 kB
Release files / ckad_agent-0.3.0.tar.gz
| Download URL | ckad_agent-0.3.0.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2d8ffc5b1ce07e246fe48b876c546a09e1358290baf2f3292f0a9fd19cab0fb
|
|
BLAKE2b-256 checksum How to use checksums |
f4bf05f42bf1c61425778d8f8e8fa486b7e1543a151b4a3c19dfdf947b0fa68a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|
Release files / ckad_agent-0.3.0-py3-none-any.whl
| Download URL | ckad_agent-0.3.0-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9494fda988aef10d425b016e1ca96f0dff119d963f0b50243adeb4c8b3c77f7a
|
|
BLAKE2b-256 checksum How to use checksums |
49e961c0073be85b6b3bce9c4b1f76301166961c6f6296aeb104ccfe097db0d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|
Security for ckad-agent 0.3.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.