k8sgpt
k8sgpt is a CLI tool that scans Kubernetes clusters to diagnose and explain issues in plain English, powered by integrated AI backends (OpenAI, Azure, Cohere, Bedrock, Gemini, or local models). It codifies SRE knowledge into built-in analyzers that detect problems across pods, deployments, nodes, ingresses, and other Kubernetes resources.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | k8sgpt-ai/k8sgpt |
| Owner | k8sgpt-ai |
| Primary language | Go |
| License | Apache-2.0 — OSI-approved |
| Stars | 8k |
| Forks | 1k |
| Open issues | 131 |
| Latest release | v0.4.35 (2026-07-01) |
| Last updated | 2026-07-08 |
| Source | https://github.com/k8sgpt-ai/k8sgpt |
What k8sgpt is
Written in Go, k8sgpt provides both standalone CLI and Kubernetes operator modes for cluster analysis. It includes 14+ built-in analyzers (enabled by default) and 10+ optional analyzers for workloads, infrastructure, and extensibility. Recent versions support Model Context Protocol (MCP) integration with Claude Desktop and can be deployed as a continuous monitoring operator.
Get the k8sgpt source
Clone the repository and explore it locally.
git clone https://github.com/k8sgpt-ai/k8sgpt.gitcd k8sgpt# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Configure AI backend credentials securely (k8sgpt auth add stores API keys locally; ensure RBAC and secrets management in Kubernetes mode).
- Tailor active filters via k8sgpt filters to match your cluster type and SLOs (e.g., disable optional analyzers not relevant to your workloads).
- Test analyzer accuracy and latency with sample cluster issues before deploying operator mode; review AI outputs for false positives.
- Plan for AI API costs if using external backends; consider local model alternatives (Ollama, Llama) for cost-sensitive or air-gapped scenarios.
- Integrate with existing observability stack (Prometheus, Alertmanager, Grafana) via the operator for unified alerting and historical analysis.
When to avoid it — and what to weigh
- No Kubernetes cluster access — k8sgpt requires active kubeconfig credentials and connectivity to a running cluster; it cannot analyze offline manifests or non-Kubernetes environments.
- Strict air-gapped or on-premises-only deployments without local LLM setup — Default setup relies on external AI APIs (OpenAI, Azure, etc.). Local model support exists but requires additional configuration and hardware resources.
- Need for real-time, production-critical alerting without validation — AI-generated explanations should be treated as helpful diagnostics, not authoritative fixes; always verify recommendations before automated remediation.
- Organizations requiring custom compliance or data residency controls — Cluster data and API calls are sent to configured AI backends; ensure vendor agreements and data classification align with your governance model.
License & commercial use
Apache License 2.0 (Apache-2.0). Permissive open-source license allowing commercial use, modification, and distribution under Apache license terms.
Apache-2.0 is a permissive OSI-approved license. Commercial use, bundling, and derivative products are allowed, provided Apache license terms (including attribution and license copy) are retained. No proprietary restrictions on integrating k8sgpt into commercial SaaS, managed services, or products. Verify your AI backend vendors' terms if reselling k8sgpt as a managed service (some LLM providers restrict commercial resale).
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Strong |
| Assessment confidence | High |
k8sgpt reads cluster state (pods, logs, events, resource definitions) and sends diagnostic summaries to configured AI backends. Security posture depends on: (1) AI backend selection and data residency agreements (OpenAI, Azure, Bedrock terms); (2) kubeconfig permissions (principle of least privilege for serviceaccount in operator mode); (3) credential storage (k8sgpt stores API keys locally; use Kubernetes secrets/sealed-secrets in operator mode); (4) network egress policies if air-gapped. No known CVEs reported in provided data. Recommend reviewing cluster RBAC, audit logs, and AI vendor security docs before production deployment.
Alternatives to consider
Kubewarden / Kyverno (policy-driven analysis)
Policy engines focus on preventive validation and enforcement rather than post-incident diagnostics; better for compliance automation but don't provide AI-powered explanations.
Prometheus + Grafana + custom alerting rules
Mature observability stack for metrics and alerting; requires manual rule authoring and does not include SRE domain knowledge or AI-powered diagnostics.
Datadog / New Relic / Dynatrace (all-in-one platforms)
Comprehensive monitoring SaaS with built-in troubleshooting; higher cost, vendor lock-in, and less customization than k8sgpt's modular open approach.
Build on k8sgpt with DEV.co software developers
Reduce MTTR and skill barriers by automating cluster issue analysis and triage. Install k8sgpt today to diagnose problems in plain English.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
k8sgpt FAQ
Do I need to expose my cluster to the internet to use k8sgpt?
Can I write custom analyzers?
What RBAC permissions does k8sgpt need?
How does k8sgpt handle sensitive data in logs or events?
Software developers & web developers for hire
From first prototype to production, DEV.co delivers software development services around tools like k8sgpt. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across open-source devops and beyond.
Simplify Kubernetes troubleshooting with AI-powered diagnostics
Reduce MTTR and skill barriers by automating cluster issue analysis and triage. Install k8sgpt today to diagnose problems in plain English.