Skip to main content

KubeSift logo

KubeSift

Find out what is broken in Kubernetes, why, and what changed — in one command.

PyPI CI License

Website · Quick start · Docs · Production guide

KubeSift reads your cluster, runs 73 deterministic checks, links each failure to the change that most likely caused it (a rollout, a ConfigMap edit, a Helm upgrade, a node going away) and tells you the fix, with the exact commands. An LLM is optional: it ranks and explains the evidence, it never invents it.

KubeSift explaining a crash loop: the rollout that removed DATABASE_URL, and the rollback command

Real output on the demo cluster used by the tests (python scripts/gen_readme_image.py).

Quick start

You need Python 3.10 or newer and a cluster that kubectl can reach. KubeSift only reads; it never changes the cluster unless you run kubesift fix and confirm.

  1. Install.

    pipx install "kubesift[all]"
    

    No pipx? python -m pip install --user pipx && python -m pipx ensurepath, then open a new terminal. pip install "kubesift[all]" in a virtualenv works too. No Python at all? One line installs the standalone kubectl-sift (checksum-verified):

    curl -sSfL https://raw.githubusercontent.com/OpeyemiAdeniji/KubeSift/main/scripts/install.sh | sh
    

    Windows (PowerShell): irm https://raw.githubusercontent.com/OpeyemiAdeniji/KubeSift/main/scripts/install.ps1 | iex (more).

  2. Check that kubectl reaches your cluster. KubeSift uses the same kubeconfig and current context.

    kubectl get nodes
    

    No cluster yet? kind makes a local one in a minute (needs Docker): kind create cluster.

  3. Check the setup. Connection, read permissions, metrics and AI configuration, with a fix for anything missing.

    kubectl sift doctor
    
  4. Find what is broken. All namespaces, or one with -n; -v adds evidence and recent changes.

    kubectl sift diagnose
    kubectl sift diagnose -n shop -v
    kubectl sift ask "why is checkout failing?"
    
  5. Practise on a safe failure (optional). A drill breaks a separate kubesift-drill namespace on purpose:

    kubectl sift drill start crashloop --yes
    kubectl sift diagnose -n kubesift-drill
    kubectl sift drill reveal crashloop
    kubectl sift drill stop
    
  6. Add AI explanations (optional). Everything above works without it. export ANTHROPIC_API_KEY=... (or OPENAI_API_KEY, OPENROUTER_API_KEY, or a local Ollama model), then run kubectl sift doctor again.

kubesift and kubectl sift are the same command.

Why

Most incidents follow a change, and most of the time goes into finding the cause: jumping between kubectl, dashboards, logs, Git and chat. KubeSift answers the on-call questions directly:

  • What is broken? Crash loops (with exit-code and log-based explanations), OOM kills, image pulls (including Docker Hub rate limits), pending pods (with the scheduler's real reason), missing ConfigMaps/Secrets, Services with no endpoints or the wrong port, dead nodes, unbound volumes, failing Jobs and CronJobs, autoscalers that can't scale, broken DNS, NetworkPolicies that block DNS, down admission webhooks that block deploys, pod IP exhaustion, expiring certificates, and apps refused access (Kubernetes RBAC told apart from cloud IAM, admission policies, quotas and LimitRanges, with the exact kubectl auth can-i check).
  • Why, and what changed? Rollout diffs (image, env, resources, probes), config edits, Helm releases, Argo CD syncs, scaling and node events — linked to the problems they caused, with rollback commands.
  • What will hurt next? Removed APIs for your next upgrade, PDBs that will hang node drains, retired ingress-nginx, containerd 1.x and cgroup v1 nodes, kubelet skew, missing probes and limits, privileged containers, plaintext secrets in env, single replicas.
  • What is it costing? Over-requested CPU/memory with right-sizing values from real usage, idle GPUs, unused volumes and idle load balancers.

How it works

KubeSift reads the cluster into a redacted snapshot, runs 73 checks and change detection on it, links each problem to the change that likely caused it and explains the fix. It is used from the CLI, a dashboard, AI assistants, CI and alerting; AI is optional.

More detail: architecture.

Run it in the cluster

A Helm chart runs the dashboard, REST API, shared MCP endpoint, Alertmanager receiver and background scans that post to Slack or Teams. Images and charts are signed; for high availability (2+ replicas on PostgreSQL) see docs/production.md:

helm install kubesift oci://ghcr.io/opeyemiadeniji/charts/kubesift -n kubesift --create-namespace \
  --set llm.provider=anthropic --set llm.anthropicApiKey=$ANTHROPIC_API_KEY \
  --set notifications.slackWebhookUrl=$SLACK_WEBHOOK

Use it

Command What it does
kubesift diagnose [-n ns] [-v] [--risks] Scan, group problems into incidents, explain causes
kubesift ask "why is checkout failing?" Plain-English questions, focused on the resources you name
kubesift changes --since 2h What changed: rollouts with diffs, config edits, Helm, Argo CD, scaling, nodes
kubesift explain deploy/checkout -n shop Everything about one resource: status, pods, events, logs, findings, changes
kubesift audit Production-readiness review (reliability, security, resources, upgrade risks)
kubesift upgrade-check --target 1.36 Blockers for the next Kubernetes version
kubesift cost Right-sizing and waste, with monthly savings
kubesift lint ./k8s -t 1.36 Check manifests, Helm charts or Kustomize dirs before they ship (no cluster needed)
kubesift preflight k8s/ -n prod Before deploy: check a change against the live cluster (missing Secrets, capacity, OOM risk, risky diffs, webhook rejections)
kubesift diff --since 2h Time travel: what is different between now and two hours ago
kubesift postmortem -n shop After: draft a blameless postmortem with timeline, root cause and action items
kubesift drill start crashloop Practise: break a drill namespace on purpose to train on-call
kubesift knowledge export / import Share what fixed past incidents between teams and clusters
kubesift fix rollback deployment/checkout -n shop Guarded fix: plan → server-side dry run → confirm → apply → verify it worked → audit log. Also set-selector, set-memory, grant, restart, scale (fixes)
kubesift ticket -n shop Open a GitHub issue for the incident (evidence, cause, fix, how to verify); never a duplicate (tickets)
kubesift verify deploy/checkout -n shop Did the fix work? Waits for the rollout, watches the new pods, re-runs the checks (also after kubectl, Helm or GitOps changes)
kubesift snapshot save Redacted snapshot to analyse later with --from (judged as of when it was taken) or attach to a ticket
kubesift note add pod-oomkilled "Raised to 1Gi; leak fixed in 3.3" Team memory, shown next to matching findings
kubesift history Past investigations
kubesift serve Web dashboard and REST API: incidents with a map of the broken link, live updates from background scans (fixed incidents move to Resolved), redacted pod logs, search and filters (dashboard)
kubesift mcp MCP server for Claude, Cursor, VS Code and other assistants

Every command takes -o json; diagnose and lint also take -o markdown (paste into a ticket or postmortem) and lint takes -o sarif (GitHub code scanning). --fail-on high makes CI fail on findings.

Where it fits

  • On call: kubectl sift diagnose -n <ns> -v or ask your AI assistant through MCP (docs/mcp.md).

  • Alerts: point Alertmanager at /api/v1/webhooks/alertmanager; KubeSift investigates the alert's namespace and posts the diagnosis to Slack/Teams before anyone opens a laptop.

  • Slack: /sift diagnose shop, /sift why checkout, /sift changes, with a "Roll back (dry run)" button (docs/slack.md).

  • CI: stop problems before they ship. kubesift preflight checks the change against the real cluster (docs/preflight.md); kubesift lint needs no cluster.

    - uses: OpeyemiAdeniji/KubeSift@v2
      with: {paths: k8s/, target-version: "1.36", fail-on: high}
    

    or as a pre-commit hook (id: kubesift-lint).

  • Upgrades and FinOps: upgrade-check before every version bump; cost monthly.

AI is optional, and careful

Provider Setup
Anthropic export ANTHROPIC_API_KEY=... (default model claude-opus-5-5; pip install "kubesift[anthropic]")
OpenAI / OpenRouter export OPENAI_API_KEY=... or OPENROUTER_API_KEY=...
Local (Ollama, vLLM) export KUBESIFT_LLM_PROVIDER=ollama KUBESIFT_LLM_MODEL=llama3.1 (without a GPU expect minutes per answer; raise KUBESIFT_LLM_TIMEOUT)
None Works fully on rules: --no-llm or KUBESIFT_LLM_PROVIDER=none
  • Secret and ConfigMap values are never kept: they are reduced to key names the moment they are read, and certificates to their expiry date.
  • Tokens, passwords, API keys, connection-string credentials and emails are redacted from logs before they are stored or sent. send_logs_to_llm: false keeps logs out of prompts entirely.
  • LLM answers must cite real findings; uncited claims are capped at 40% confidence. Any LLM failure falls back to the rule-based diagnosis. python scripts/eval_ai.py --provider <name> scores a model on the demo cluster (does it find the real causes, does it cite real evidence) before you rely on it.
  • Read-only by default. Fixes need an explicit confirmation (CLI) or allow_writes (server/MCP), always run a server-side dry run first and are written to an audit log.

Docs

License

Apache-2.0

Develop

pip install -e ".[dev]"
pytest                          # unit tests on a synthetic broken cluster
./scripts/e2e.sh                # breaks a kind cluster on purpose and checks every failure is explained
python scripts/eval_ai.py --provider anthropic   # grades an LLM's explanations (needs its API key)

Metadata

Release files for kubesift 2.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kubesift 2.2.1
File Size Uploaded Provenance Actions
kubesift-2.2.1.tar.gz 2.0 MB With provenance Details for kubesift-2.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kubesift 2.2.1
File Interpreter ABI Platform Actions
kubesift-2.2.1-py3-none-any.whl Python 3 none any Details for kubesift-2.2.1-py3-none-any.whl

Total release size: 2.2 MB

Release files / kubesift-2.2.1.tar.gz

Download URL kubesift-2.2.1.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
26f9f18ed8c9b4f06888ab71deec7998ff33b924b3533ff09568af3bb9b62970
BLAKE2b-256 checksum
How to use checksums
48220b512e0019c7840551da022641c74580c4ea3385fb054c29120482ca0f38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / kubesift-2.2.1-py3-none-any.whl

Download URL kubesift-2.2.1-py3-none-any.whl
Size 197.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05109aef6bf189693ea6914847744b53bfa32439259ba72b9221717121c15339
BLAKE2b-256 checksum
How to use checksums
92a6720077cbd1bf8ec32b18d69edeeb02976cc41bc5cce13b317ee95c605c3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for kubesift 2.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kubesift-2.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page