DEV.co
Open-Source DevOps · k8sgpt-ai

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.

Source: GitHub — github.com/k8sgpt-ai/k8sgpt
8k
GitHub stars
1k
Forks
Go
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryk8sgpt-ai/k8sgpt
Ownerk8sgpt-ai
Primary languageGo
LicenseApache-2.0 — OSI-approved
Stars8k
Forks1k
Open issues131
Latest releasev0.4.35 (2026-07-01)
Last updated2026-07-08
Sourcehttps://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.

Quickstart

Get the k8sgpt source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/k8sgpt-ai/k8sgpt.gitcd k8sgpt# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Incident triage and root cause explanation

Quickly surface why a pod is failing, a deployment cannot scale, or nodes are unschedulable—without requiring deep kubectl expertise from every team member.

SRE knowledge codification and training

Embed domain patterns (readiness probes, resource limits, webhook misconfigurations) into analyzers to enforce standards and teach best practices automatically.

Continuous cluster monitoring in production

Deploy via k8sgpt-operator for ongoing analysis integrated with Prometheus/Alertmanager, enabling proactive alerting on detected cluster anomalies.

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.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityLow
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related 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?
No. k8sgpt CLI runs locally with kubeconfig. The operator runs in-cluster. API calls to external AI backends (OpenAI, Azure) require egress; use local LLM models (Ollama, Llama) if fully air-gapped.
Can I write custom analyzers?
Yes, but it requires modifying k8sgpt source code; no documented plugin system. Contributions to the main project are welcomed.
What RBAC permissions does k8sgpt need?
Read-only GET/LIST on core Kubernetes resources (pods, deployments, nodes, events, configmaps, services, ingresses, statefulsets, daemonsets, jobs, cronjobs). In operator mode, requires a serviceaccount with these permissions and ability to create ConfigMaps for caching.
How does k8sgpt handle sensitive data in logs or events?
k8sgpt sends cluster diagnostics (errors, resource descriptions) to the AI backend for analysis. Review your AI vendor's data handling policies and consider masking sensitive values before analysis if required by compliance rules.

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.