Skip to main content

AI-powered Kubernetes management — local server and CLI

Project description

KubeIntellect V2

AI-powered Kubernetes management. Natural-language interface to diagnose faults, query cluster state, and execute remediation — with human approval gating all destructive actions.


Quickstart

Install (requires Python 3.12+)

python3 -m venv .venv
source .venv/bin/activate
pip install kubeintellect

Ubuntu 22.04 ships Python 3.10. Check your version first:

python3 --version   # need 3.12 or higher

If you have 3.10, install 3.12 from the deadsnakes PPA:

sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get install -y python3.12
python3.12 -m venv .venv && source .venv/bin/activate
pip install kubeintellect

First-time setup — one command

kubeintellect init

The wizard will:

  • Ask your LLM provider (OpenAI or Azure) and API key
  • Offer to create a local Kind cluster with sample workloads
  • Offer to install Prometheus, Grafana, and Loki for observability
  • Offer to deploy broken-pod RCA scenarios to practise with
  • Choose SQLite (default) or PostgreSQL for persistence
  • Generate an API key and configure kq automatically
  • Install a systemd service so the server starts on every login

After init completes, open a new terminal and run:

kq

That's it. No manual server start, no copy-pasting API keys.

What kubeintellect status shows

  Config:    ✓  ~/.kubeintellect/.env
  LLM:       ✓  azure / gpt-4o
  DB:        ✓  sqlite  ~/.kubeintellect/kubeintellect.db
  kubectl:   ✓  found
  Kube:      ✓  ~/.kube/config  context: kind-kubeintellect
  Auth:      ✓  enabled
    admin     ki-admin-xxxxxxxxxxxxxxxxxxxx   ← use this as KUBE_Q_API_KEY
  Prometheus:✓  http://172.18.0.2:30090  reachable
  Loki:      ✓  http://172.18.0.2:30100  reachable
  Grafana:   ✓  http://172.18.0.2:30080  reachable
  kube-q:    ✓  found

Database

Mode When Setup
SQLite Default — local / testing None — init sets it automatically
PostgreSQL Production / team Set DATABASE_URL in ~/.kubeintellect/.env

Other deployment options

Option When to use
Docker Compose Laptop, no K8s cluster, full stack via Docker
Kind cluster Local K8s dev with monitoring + Langfuse
Cloud / VM (Helm) Production, AKS, or company cluster

Full guide: docs/quickstart.md


Architecture

kq (CLI)  ──► KubeIntellect API (FastAPI + LangGraph)
                │
                ├── Coordinator (GPT-4o)
                │     ├── simple query  → direct tool use → answer
                │     └── complex fault → fan-out to 4 parallel subagents
                │           ├── Pod subagent     (kubectl)
                │           ├── Metrics subagent (Prometheus / PromQL)
                │           ├── Logs subagent    (Loki / LogQL)
                │           └── Events subagent  (kubectl events)
                │
                ├── HITL gate — destructive ops pause for approval
                └── Role check — admin / operator / readonly enforced

Checkpointing: conversation state persists to PostgreSQL (production) or SQLite (local).


Authentication

Optional — if no keys are set, all requests are accepted.

# ~/.kubeintellect/.env  (written by kubeintellect init)
KUBEINTELLECT_ADMIN_KEYS=ki-admin-abc123
KUBEINTELLECT_OPERATOR_KEYS=ki-op-def456
KUBEINTELLECT_READONLY_KEYS=ki-ro-xyz789

Generate keys: openssl rand -hex 20


Repo layout

app/                        # core Python source (shared by all deployments)
deploy/
  docker-compose/           # monitoring configs (prometheus.yml, loki-config.yml, grafana)
  helm/
    kubeintellect/          # Helm chart + values for all environments
    langfuse/               # Langfuse LLM tracing chart
  kind/                     # Kind cluster configs
docker-compose.yaml         # laptop deployment entry point
scripts/
  kind/create-kind-cluster.sh
  vm/setup-nginx.sh, setup-tls.sh
tests/
docs/

kubeintellect kind-setup vs make kind-cluster-create

Two ways to get a local Kind cluster — pick based on who you are:

kubeintellect kind-setup make kind-cluster-create
Requires repo clone No Yes
Cluster config Single-node 2-node, hot-reload mounts
Ingress Basic nginx Tuned for Kind dev
Cluster DNS auto-config Yes — svc.cluster.local works from host No
Monitoring / Langfuse Via make targets (after cloning) make monitoring-install / make langfuse-install
Who it's for End users, ops teams KubeIntellect developers

Docs

Topic File
All install options docs/quickstart.md
pip — no cluster (quick try) docs/install-pip-no-cluster.md
pip — existing cluster docs/install-pip-existing-cluster.md
pip — local Kind cluster docs/install-pip-kind.md
Docker Compose docs/deploy-docker-compose.md
Kind dev environment (repo) docs/deploy-kind.md
VM / AKS / cloud (Helm) docs/deploy-cloud.md
All config options docs/configuration.md

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

kubeintellect-2.0.0a2.tar.gz (57.6 kB view details)

Uploaded Source

Built Distribution

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

kubeintellect-2.0.0a2-py3-none-any.whl (70.2 kB view details)

Uploaded Python 3

File details

Details for the file kubeintellect-2.0.0a2.tar.gz.

File metadata

  • Download URL: kubeintellect-2.0.0a2.tar.gz
  • Upload date:
  • Size: 57.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kubeintellect-2.0.0a2.tar.gz
Algorithm Hash digest
SHA256 2f57fe7465c05cf3f7ef145172d465a79d853bcc61db3c8744ada16c1aa30193
MD5 e303868707eee913df58ae36cc230c40
BLAKE2b-256 e021f35386a53490cf11484365870aa0953bb5611a4a111bff6131c0491da84b

See more details on using hashes here.

Provenance

The following attestation bundles were made for kubeintellect-2.0.0a2.tar.gz:

Publisher: publish.yml on MSKazemi/KubeIntellectV2-dev

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kubeintellect-2.0.0a2-py3-none-any.whl.

File metadata

  • Download URL: kubeintellect-2.0.0a2-py3-none-any.whl
  • Upload date:
  • Size: 70.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kubeintellect-2.0.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 70d828ec8113ed1244bc0ef97f777e96f9c26f0511a3516f6aaf568add88a2d3
MD5 a16a131b0332b862d1a086aa420cbbc7
BLAKE2b-256 b4f37745dd176fb277c90221b8895caf0e6f95ed4a7ae5c0d9f565f08ab106d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for kubeintellect-2.0.0a2-py3-none-any.whl:

Publisher: publish.yml on MSKazemi/KubeIntellectV2-dev

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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