Skip to main content

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 kubectl commands

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 kubectl follow-up commands
  • --mock mode for offline testing
  • --previous support for restarted containers
  • --container selection 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

k8s_ai_cli-0.1.3.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

k8s_ai_cli-0.1.3-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

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

Hashes for k8s_ai_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 826963c2b694293e07c41dcdbcf07cb57ced93a6c70183919fb19b48f5206726
MD5 acf9fef48480926bb399b21452d6ec99
BLAKE2b-256 8e0ebdd9b4856f84f3a812544f01a150f04ce45d7a72a0e523ba28ca66e40df3

See more details on using hashes here.

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

Hashes for k8s_ai_cli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b91ed865f8f4ea340a9d822a0d37cc8beefed08e069cc692e168915e1c3b7e49
MD5 04244cef3478eb1bca6543b6e3af23dd
BLAKE2b-256 09c0f17602cd06ab974d3fbee044ecd3e0c6c0b77882a43f0075e7b765b157db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page