Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

K8sGPT

$ k8sgpt Foundation Med Risk
K8sGPT / CNCF · Cloud & Infra · Apache-2.0 · macos / linux / windows

k8sgpt runs built-in Kubernetes analyzers (Pods, Services, Deployments, Ingress, PVCs) to surface cluster failures cleanly in JSON (--output=json), with optional --explain LLM remediation and --anonymize secret scrubbing.

FCRS-1.0 Score
82 /100
Good
Medium Confidence
Zero-Friction Install
brew install k8sgpt
CLI vs MCP Decision CLI Preferred vs MCP

Coding agents already have an LLM, so running k8sgpt analyze --output=json without --explain gives zero-LLM-cost deterministic Kubernetes diagnostics.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Clean --output=json, --filter, --namespace, and --explain toggle allow agents to run pure deterministic checks or AI-enriched scans.

  • Supports --output=json, --filter, and -n <namespace>
  • Optional --explain and --anonymize flags
Trust & Safety 19 / 25

Read-only against Kubernetes clusters, though --explain sends cluster error snippets to external LLMs unless --anonymize or a local backend is configured.

  • Read-only Kubernetes API scanning
  • --explain transmits cluster metadata to external LLMs unless anonymized
Setup & Portability 14 / 15

Single static Go binary via Homebrew and GitHub Releases on macOS, Linux, and Windows.

  • Cross-platform binary via brew install k8sgpt
Utility & Efficiency 12 / 15

Bundles curated Kubernetes failure analyzers into a single JSON command, saving agents from cross-checking Pods, Events, and Endpoints manually.

  • Multi-resource diagnostic analyzers in one pass
Maintenance & Lineage 8 / 10

CNCF Sandbox project (k8sgpt-ai/k8sgpt) under Apache-2.0.

  • CNCF k8sgpt-ai/k8sgpt repository
Docs & Verifiability 8 / 10

Clear docs.k8sgpt.ai reference covering analyzers, auth backends, and filters.

  • Official docs at docs.k8sgpt.ai

Security, Auth & Guardrails

Auth Modes
Config File Env API Key
Credential Storage

Reads cluster state from ~/.kube/config (KUBECONFIG) and stores LLM backend configs/keys in OS XDG config (k8sgpt.yaml) via k8sgpt auth add.

Side Effects
Read-Only Local Write Billing Impact
Cost & Quotas

CLI is free (Apache-2.0); --explain incurs third-party LLM token charges unless using local Ollama/NoopAI.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# K8sGPT Agent Rules
- Omit `--explain` when the coding agent itself will interpret `k8sgpt analyze --output=json` findings (faster and avoids duplicate LLM billing).
- Whenever `--explain` is used with cloud LLMs, ALWAYS pass `--anonymize`.
- Pass `--backend`, `--model`, and `--password` explicitly on `k8sgpt auth add` to avoid interactive prompts.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run deterministic cluster diagnostics as JSON without LLM calls
k8sgpt analyze -n default --filter=Pod,Service --output=json

Runs K8sGPT's built-in Go analyzers locally against the cluster and outputs structured JSON findings without calling an external LLM.

Run anonymized AI-explained analysis in JSON
k8sgpt analyze -n default --explain --anonymize --output=json

Obfuscates sensitive names/values before requesting LLM explanations and returns structured JSON.

Strengths for Agents

  • + k8sgpt analyze --output=json works without an LLM key when --explain is omitted.
  • + Built-in --anonymize scrubs sensitive identifiers before sending data to external LLM backends.
  • + Supports --filter and --namespace to keep JSON diagnostic output focused.

Caveats & Pitfalls

  • ! k8sgpt auth add prompts interactively if --backend/--password flags are omitted.
  • ! Enabling --explain with cloud AI providers incurs external token costs and data egress risk without --anonymize.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI