Skip to main content
Glama

k8s-guard

English · 한국어

Zero-dependency Kubernetes YAML, Dockerfile, and Terraform safety checker, CLI, local stdio MCP server, and web checklist. Built to catch outage, security, and AWS cost traps before you deploy AI-generated infrastructure configs.

Do you actually need Kubernetes yet? Read the Objective Kubernetes Readiness Framework (6 measurable metrics & scoring matrix) before migrating.

What It Catches

  • Kubernetes Reliability & High Availability: Missing resources.requests/limits (OOM & broken HPA), missing readinessProbe/livenessProbe, single replicas: 1, Recreate strategy downtime, missing node spread (topologySpreadConstraints/podAntiAffinity), missing PodDisruptionBudget, missing Graceful Shutdown (terminationGracePeriodSeconds/preStop), unpinned :latest tags, Service selector vs Deployment label mismatch, and HPA maxReplicas DB connection pool warnings.

  • Security: privileged: true, missing runAsNonRoot: true, missing allowPrivilegeEscalation: false, plaintext secrets in ConfigMap / container env / Dockerfile ENV|ARG, and 0.0.0.0/0 exposure on SSH/DB/Redis ports.

  • AWS Cost Traps (Terraform): aws_eks_cluster ($0.10/hr control plane, no free tier) and aws_nat_gateway (~$32–33/mo + data fees, no free tier) warnings.

Related MCP server: infrawise

Quickstart (Zero Dependencies, Node.js 18+)

# Audit a file or directory
npx --yes --package=github:shaul1991/k8s-guard k8s-guard ./k8s/ --lang en

# JSON output for CI gates (exits 1 on FAIL)
npx --yes --package=github:shaul1991/k8s-guard k8s-guard ./deploy.yaml --json --lang en

# Start local stdio MCP server (Claude Desktop, Cursor, Codex)
npx --yes --package=github:shaul1991/k8s-guard k8s-guard mcp

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers