All How-To Guides

3 Ways to Manage Kubernetes with Claude Code

How to manage Kubernetes with Claude Code?

3 MCP servers featured

Kubernetes orchestration is complex, and having Claude assist with cluster management can be incredibly valuable. MCP servers provide safe access to your clusters for deployments, debugging, and operations. Here are the best options for Kubernetes integration.

Recommended MCP Servers

Kubernetes MCP Server

containers/kubernetes-mcp-server

>900

The most popular Kubernetes MCP server with deep integration for cluster resources and OpenShift support.

Key Features

  • Any Kubernetes resource
  • OpenShift support
  • Multi-cluster management
  • Deep cluster integration

Installation

See GitHub for setup

The most popular Kubernetes MCP with 991+ stars. Supports any resource type, multiple clusters, and includes OpenShift support. Recently moved to the containers organization.

Best for: Production cluster management View on GitHub

K8s MCP Server

alexei-led/k8s-mcp-server

>100

Secure bridge enabling AI assistants to execute validated Kubernetes commands including kubectl, helm, istioctl, and argocd.

Key Features

  • kubectl commands
  • Helm support
  • Istio and ArgoCD
  • Secure validation

Installation

See GitHub for setup

A secure Kubernetes MCP that supports not just kubectl, but also Helm, Istio, and ArgoCD. Great for GitOps workflows and service mesh management.

Best for: GitOps and service mesh workflows View on GitHub

Shell MCP + kubectl

anthropics/mcp-server-shell

>2k

Run kubectl commands directly for full cluster access.

Key Features

  • Full kubectl access
  • Helm commands
  • Any K8s operation
  • Existing kubeconfig

Installation

npx @modelcontextprotocol/server-shell

If you're comfortable with kubectl, the Shell MCP lets Claude run any Kubernetes command. Use your existing kubeconfig, run Helm charts, and perform any cluster operation.

Best for: Experienced K8s users View on GitHub

Quick Comparison

MCPStarsBest ForProsCons
MCP K8s>500Full management50+ tools, OpenShiftComplex setup
MCP Kubernetes>300Basic operationsSimple, focusedLimited resources
Shell + kubectl>2kPower usersAny commandLess guardrails

Getting Started

To manage Kubernetes with Claude Code:

  1. Ensure kubectl is configured with cluster access.

  2. For structured access, set up MCP K8s:

    # Follow setup at github.com/strowk/mcp-k8s
    
  3. For kubectl access, Claude can use bash:

    "Show me all pods in the production namespace that are not running."
    

Example prompt: "Scale the web deployment to 5 replicas and show me the rollout status."

Related Guides