Skip to main content

Kubernetes Troubleshoot

io.github.NanaGyamfiPrempeh30/k8s-troubleshoot-mcp

v1.0.0Updated Aug 24, 2026stdio · Docker

Read-only Kubernetes diagnostics: pods, logs, events, workloads, services, PVCs and nodes.

Install

Replace 1 placeholder with your own values.

Run in your terminal. Replace 1 placeholder.

claude mcp add k8s-troubleshoot-mcp -e KUBECONFIG=/kubeconfig -e 'ALLOWED_NAMESPACES=<your-allowed-namespaces>' -e LOG_LEVEL=INFO -e API_TIMEOUT_SECONDS=30 -e MAX_LOG_LINES=200 -- docker run -i --rm -e KUBECONFIG -e ALLOWED_NAMESPACES -e LOG_LEVEL -e API_TIMEOUT_SECONDS -e MAX_LOG_LINES docker.io/yawgyamfiprem32/k8s-troubleshoot-mcp:1.0.0

The registry lists extra launch arguments or environment variables for this server that could change what runs. They are left out here; check its repository before adding any.

Configuration

6 settings.

  • KUBECONFIG
    Env var· required
    Path to the kubeconfig inside the container. Must match the mount destination. There is no fallback to ~/.kube/config and no in-cluster config: a missing, unreadable or malformed file is a startup failure rather than a silent downgrade to an ambient credential.Default: /kubeconfig
  • ALLOWED_NAMESPACES
    Env var· required
    Comma-separated namespaces the server may read, e.g. staging,production. Wildcards (* and all) are rejected at startup, and kube-system and kube-public are stripped even if listed. This is defense-in-depth, not the security boundary — the boundary is the ServiceAccount's RBAC bindings.
  • --mount
    Argument· required
    Mount the kubeconfig read-only. This server performs no writes of any kind, so a writable mount would grant privilege it has no use for.
  • LOG_LEVEL
    Env var· optional
    DEBUG, INFO, WARNING or ERROR. All logging goes to stderr; stdout carries the JSON-RPC stream exclusively.Default: INFO
  • API_TIMEOUT_SECONDS
    Env var· optional
    Kubernetes API request timeout. Must be a positive integer.Default: 30
  • MAX_LOG_LINES
    Env var· optional
    Maximum log lines any single get_pod_logs call may return. Must be a positive integer; clamped to a hard ceiling of 1000 with a warning.Default: 200

Listed in the official MCP Registry since Aug 24, 2026. Mirrored daily; last checked Nov 26, 2026.