Back to MCP Directory
Kubectl
Model Context Protocol moderate risk

Kubectl

kubectl-mcp-server enables natural language interaction with Kubernetes clusters, allowing users to manage and troubleshoot their infrastructure via AI assistants.

Connections & Capabilities

Connects To

GitHubRedisDockerKubernetesVercel

Capabilities

readwriteexecadmin

Quickstart

Install

npm install -g skillkit

Config

{
  "mcpServers": {
    "kubernetes": {
      "command": "npx",
      "args": ["-y", "kubectl-mcp-server"]
    }
  }
}

Exposed MCP Tools (5)

safe
get_pods

Retrieves a list of pods in a specified namespace.

Read-only operation, no modification of cluster state.

moderate
create_deployment

Creates a new deployment in the Kubernetes cluster.

Creates resources, but doesn't directly impact existing critical components.

moderate
scale_deployment

Scales the number of replicas for a given deployment.

Modifies the number of pods, potentially impacting application availability.

high
exec_pod

Executes a command inside a specified pod.

Allows arbitrary command execution within a pod, potentially leading to security breaches.

critical
delete_pod

Deletes a pod from the cluster.

Destructive operation that can cause service disruption.

Safety Assessment

kubectl-mcp-server offers a convenient way to interact with Kubernetes using natural language. It's relatively safe for read-only operations and exploration. However, caution is advised when performing write operations, and proper RBAC configuration is crucial to mitigate risks.

  • Supports non-destructive mode to prevent accidental changes
  • RBAC validation ensures actions are authorized
  • Secret masking protects sensitive information
  • Provides read-only access for safe exploration
  • Can perform write operations on the cluster
  • Requires kubectl to be configured correctly, which can be complex
  • Potential for privilege escalation if RBAC is misconfigured
  • Exposes Kubernetes API to AI assistant, increasing attack surface
  • Incorrect natural language commands could lead to unintended actions