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.0a3.tar.gz (57.7 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.0a3-py3-none-any.whl (70.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kubeintellect-2.0.0a3.tar.gz
  • Upload date:
  • Size: 57.7 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.0a3.tar.gz
Algorithm Hash digest
SHA256 ca31f6c9d09c93fe80797d4f63ce2052eaead91d8ffd45fac138ab84ac9010e0
MD5 3cacb2bc511386703f625b29cf913b4b
BLAKE2b-256 96b9dc73d8953c618d8bc98cc140cf2e779d1729ee237a81c846014469c86538

See more details on using hashes here.

Provenance

The following attestation bundles were made for kubeintellect-2.0.0a3.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.0a3-py3-none-any.whl.

File metadata

  • Download URL: kubeintellect-2.0.0a3-py3-none-any.whl
  • Upload date:
  • Size: 70.3 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.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 6b0f8837bd715401e645b6e35632224f85e2a958da3495241193967b87f4d84d
MD5 2f1efbbb80c23eb14aeea48350515196
BLAKE2b-256 c4586ef0c77d89df8d51df091e8d408871f60dad701963e8f6f9ab76f5112685

See more details on using hashes here.

Provenance

The following attestation bundles were made for kubeintellect-2.0.0a3-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