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.4.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.4-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: k8s_ai_cli-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 62ee7b0b7436b457d23c14a7258a0b8f100f6d549d403dcd88054f6e5d1bab6b
MD5 824e319da06c86d0d9378101541e429c
BLAKE2b-256 1ede3b0a78a928d2806db9bb4f3b008edbc1abfbe7d40a608a0b0d15412e6409

See more details on using hashes here.

File details

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

File metadata

  • Download URL: k8s_ai_cli-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 379d1d1d1e12a4389b8c265435e6381bb81df72f8f704fc797770653a4d2673f
MD5 85191587d0864ade39acf917766b7401
BLAKE2b-256 44e62ac425d5f0ebaef6b55e28630c1034c75a09125fb014cc2048c33a3e8e66

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