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.2.tar.gz (5.8 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.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file k8s_ai_cli-0.1.2.tar.gz.

File metadata

  • Download URL: k8s_ai_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 5.8 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.2.tar.gz
Algorithm Hash digest
SHA256 5a10e06e305f988b7308529caaa76f802a4e57f2c1f67a32890282c6e54d2d5c
MD5 d54d363bf8b2f4b1c7620a5a1d4b01db
BLAKE2b-256 a8cec5dda739c4ac0c27b9a09ffbc5990f10ffd83f170127ac601c5f5c993221

See more details on using hashes here.

File details

Details for the file k8s_ai_cli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: k8s_ai_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b64b3a199cfb1885c9fc3b5bd61ef80d135e5f45d0a51794d230c4a477920eeb
MD5 cc5962b5e1e6aa5e4a474e043a11cce6
BLAKE2b-256 8920c485400efaf1da9afe88c989904780f466d79ccbe229fc9dd63fef84c722

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