KubeSift
Find out what is broken in Kubernetes, why, and what changed — in one command.
Website · Quick start · Docs · Production guide
KubeSift reads your cluster, runs 72 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.
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.
-
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 standalonekubectl-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). -
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. -
Check the setup. Connection, read permissions, metrics and AI configuration, with a fix for anything missing.
kubectl sift doctor
-
Find what is broken. All namespaces, or one with
-n;-vadds evidence and recent changes.kubectl sift diagnose kubectl sift diagnose -n shop -v kubectl sift ask "why is checkout failing?"
-
Practise on a safe failure (optional). A drill breaks a separate
kubesift-drillnamespace on purpose:kubectl sift drill start crashloop --yes kubectl sift diagnose -n kubesift-drill kubectl sift drill reveal crashloop kubectl sift drill stop
-
Add AI explanations (optional). Everything above works without it.
export ANTHROPIC_API_KEY=...(orOPENAI_API_KEY,OPENROUTER_API_KEY, or a local Ollama model), then runkubectl sift doctoragain.
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-icheck). - 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
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> -vor 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 preflightchecks the change against the real cluster (docs/preflight.md);kubesift lintneeds 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-checkbefore every version bump;costmonthly.
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: falsekeeps 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
- All checks · Fixing and verifying · Dashboard · Tickets · Auto-rollback · Configuration · MCP setup · Standalone binary and krew · Preflight · Slack · Production deployment · Architecture · Releasing · Contributing · Security
License
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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kubesift-2.2.0.tar.gz | 2.0 MB | With provenance | Details for kubesift-2.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kubesift-2.2.0-py3-none-any.whl | Python 3 | none | any | Details for kubesift-2.2.0-py3-none-any.whl |
Total release size: 2.2 MB
Release files / kubesift-2.2.0.tar.gz
| Download URL | kubesift-2.2.0.tar.gz |
|---|---|
| Size | 2.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7414caaec1ae9fb440232ac29f130d09429ac966d931066fa8421279392ae0cf
|
|
BLAKE2b-256 checksum How to use checksums |
4e4535974251a911dd510c3f26231ad684563203a7f831a4b556fa39fac40d35
|
| 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 logRelease files / kubesift-2.2.0-py3-none-any.whl
| Download URL | kubesift-2.2.0-py3-none-any.whl |
|---|---|
| Size | 196.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e730c9dc825343bb82e21ce0bfa7222b2233aae15018fa44cd8a03bf879c9470
|
|
BLAKE2b-256 checksum How to use checksums |
ebe874958b08f2b59c358df35c4fb9012a7bdedfb0df4208483e0dddc5abadf3
|
| 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 logSecurity for kubesift 2.2.0
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.
Attestation for kubesift-2.2.0.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 logA 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.