CLI that explains Kubernetes pod failures from logs using AI. Works locally with kubectl.
Project description
k8s-ai
k8s-ai is a Python CLI for Kubernetes log triage. It reads pod logs via kubectl and provides:
- likely root cause
- confidence level
- suggested remediation steps
- helpful follow-up
kubectlcommands
Designed for DevOps engineers, SREs, platform teams, and Kubernetes developers.
Install
pip install k8s-ai-cli
Quick Start
# help
k8s-ai --help
# analyze a pod
k8s-ai analyze --pod my-pod-abc123 --namespace production
Mock Example (No Cluster Required)
k8s-ai analyze --mock
Real Cluster Examples
# current logs
k8s-ai analyze --pod checkout-7f9d8c6f95-2kq9m --namespace payments
# previous logs (useful for CrashLoopBackOff)
k8s-ai analyze --pod api-6b8f74d9f7-ptc2z --namespace backend --previous
# specific container in a multi-container pod
k8s-ai analyze --pod worker-5c7bbf6d8d-v8l2r --namespace jobs --container processor
Safety
k8s-ai runs locally and uses your local kubectl context. It does not store logs by default.
Features
- AI-assisted root-cause analysis from pod logs
- Confidence scoring for diagnosis quality
- Actionable remediation guidance
- Suggested
kubectlfollow-up commands --mockmode for offline testing--previoussupport for restarted containers--containerselection for multi-container pods
License
MIT
Project details
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 k8s_ai_cli-0.1.3.tar.gz.
File metadata
- Download URL: k8s_ai_cli-0.1.3.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
826963c2b694293e07c41dcdbcf07cb57ced93a6c70183919fb19b48f5206726
|
|
| MD5 |
acf9fef48480926bb399b21452d6ec99
|
|
| BLAKE2b-256 |
8e0ebdd9b4856f84f3a812544f01a150f04ce45d7a72a0e523ba28ca66e40df3
|
File details
Details for the file k8s_ai_cli-0.1.3-py3-none-any.whl.
File metadata
- Download URL: k8s_ai_cli-0.1.3-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b91ed865f8f4ea340a9d822a0d37cc8beefed08e069cc692e168915e1c3b7e49
|
|
| MD5 |
04244cef3478eb1bca6543b6e3af23dd
|
|
| BLAKE2b-256 |
09c0f17602cd06ab974d3fbee044ecd3e0c6c0b77882a43f0075e7b765b157db
|