k8s-health

k8s-health is a command for Claude Code from nodnarbnitram/claude-code-extensions. It costs 0 tokens per session (574 once invoked), scanned A, original, MIT.

A command that checks the health of a Kubernetes cluster, a system for running and managing containers. It finds installed management tools and checks the cluster and selected namespaces.

In plain words
What is it for?
Use it to check a cluster, a production namespace, or a specific tool such as Crossplane, Argo CD, cert-manager, or Prometheus. Results can be shown as a summary, detailed report, or JSON data.
Why use it?
It gathers many cluster checks in one report, so you do not have to inspect each part separately. It also highlights problems and recommendations.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/nodnarbnitram/claude-code-extensions/k8s-health
Clone the repo
git clone --depth 1 https://github.com/nodnarbnitram/claude-code-extensions

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for k8s-health

README.md
[![agentmods](https://agentmods.dev/badge/commands/nodnarbnitram/claude-code-extensions/k8s-health.svg)](https://agentmods.dev/commands/nodnarbnitram/claude-code-extensions/k8s-health)
Your own site
<a href="https://agentmods.dev/commands/nodnarbnitram/claude-code-extensions/k8s-health"><img src="https://agentmods.dev/badge/commands/nodnarbnitram/claude-code-extensions/k8s-health.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 574 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00574
Opus 5 $0.00000 $0.00287
Sonnet 5 $0.00000 $0.00115
Haiku 4.5 $0.00000 $0.00057

Measured 4d ago against content hash 1c90de8610dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

k8s-health scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/k8s-health.md · 85 lines

What it actually says

Kubernetes Health Diagnostics

Run comprehensive cluster health diagnostics using dynamic API discovery.

Arguments

  • --operator <name>: Filter to specific operator (crossplane, argocd, certmanager, prometheus)
  • --output <format>: Output format (summary, detailed, json). Default: summary
  • --namespace <ns>: Limit checks to specific namespace

Workflow

  1. Verify cluster access

    kubectl config current-context
    kubectl cluster-info --request-timeout=5s
    
  2. Confirm cluster - For production clusters, confirm before proceeding

  3. Run health check - Invoke the kubernetes-health skill:

    • Discover installed operators via API discovery
    • Dispatch k8s-core-health-agent (always)
    • Dispatch operator-specific agents based on discovery
    • Aggregate results into unified report
  4. Present results based on output format:

    • summary: Overall score, status, top issues, recommendations
    • detailed: Full component breakdown with all checks
    • json: Raw JSON for programmatic consumption

Example Usage

/k8s-health
/k8s-health --operator crossplane
/k8s-health --output json
/k8s-health --namespace production --output detailed

Output

Summary Format (default)

Cluster Health: prod-eks-us-west-2
Overall: 91/100 - HEALTHY

Components:
  + Core: 98/100 (HEALTHY)
  ~ Crossplane: 72/100 (DEGRADED)
  + ArgoCD: 95/100 (HEALTHY)
  + Cert-Manager: 100/100 (HEALTHY)

Critical Issues: None

Warnings:
  - Crossplane: 2 managed resources not ready

Recommendations:
  1. Check AWS provider credentials
  2. Review managed resource aws-rds-1

JSON Format

{
  "cluster": "prod-eks-us-west-2",
  "timestamp": "2025-12-09T11:05:00Z",
  "overall": {"status": "HEALTHY", "score": 91},
  "components": {...}
}

Invoke

Use the kubernetes-health skill and k8s-health-orchestrator agent to perform the health check based on arguments: $ARGUMENTS

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 85 lines · 0 tokens per session scan A 1c90de8610dc

Subscribe to this mod's changes

k8s-health is a command published in the GitHub repository nodnarbnitram/claude-code-extensions (16 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 574 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.