mcp-kubernetes

by whitediver

Helm chartv0.2.7App latestVerified publisher

A Helm chart for deploying the MCP server

About this chart

MCP Kubernetes Helm Chart

This Helm chart deploys the MCP server based on the mcp/kubernetes Docker image to a Kubernetes cluster.

Prerequisites

  • Kubernetes 1.16+
  • Helm 3.2.0+

Installing the Chart

To install the chart with the release name mcp-kubernetes:

helm install mcp-kubernetes ./charts/kubernetes

The command deploys the MCP server on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete the mcp-kubernetes deployment:

helm delete mcp-kubernetes

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

Global parameters

NameDescriptionValue
replicaCountNumber of MCP replicas to deploy1
nameOverrideString to partially override mcp-kubernetes.fullname""
fullnameOverrideString to fully override mcp-kubernetes.fullname""

Image parameters

NameDescriptionValue
image.repositoryMCP image repositorymcp/kubernetes
image.tagMCP image tag (immutable tags are recommended)latest
image.pullPolicyMCP image pull policyIfNotPresent
imagePullSecretsMCP image pull secrets[]

Service Account parameters

NameDescriptionValue
serviceAccount.createSpecifies whether a service account should be createdtrue
serviceAccount.annotationsAnnotations to add to the service account{}
serviceAccount.nameThe name of the service account to use""

The RBAC templates always bind to the service account defined above. With the default values you get a dedicated service account plus the required ClusterRole/ClusterRoleBinding, so no additional configuration is needed to let MCP talk to the Kubernetes API of its own cluster.

RBAC parameters

NameDescriptionValue
rbac.createCreate the RBAC objects needed by the charttrue
rbac.useClusterAdminBind the service account to the built-in cluster-admin ClusterRolefalse
rbac.existingClusterRoleName of an existing ClusterRole to bind to instead of creating one""
rbac.clusterRole.nameOverride the autogenerated ClusterRole name""
rbac.clusterRole.annotationsAdditional annotations for the generated ClusterRole{}
rbac.clusterRole.rulesRules for the generated ClusterRole[{ apiGroups: ["*"], resources: ["*"], verbs: ["*"] }]
rbac.clusterRoleBinding.nameOverride the autogenerated ClusterRoleBinding name""
rbac.clusterRoleBinding.annotationsAdditional annotations for the ClusterRoleBinding{}

ℹ️ The ClusterRoleBinding always points to the chart's service account (managed through serviceAccount.*). If you disable service account creation, be sure to provide the existing name so the binding still works.

Service parameters

NameDescriptionValue
service.typeMCP service typeClusterIP
service.portMCP service HTTP port8080

Ingress parameters

NameDescriptionValue
ingress.enabledEnable ingress record generation for MCPfalse
ingress.classNameIngressClass that will be be used to implement the Ingress""
ingress.annotationsAdditional annotations for the Ingress resource{}
ingress.pathBase path for the service (trimmed before requests hit MCP)/
ingress.pathTypePath matching behaviorPrefix
ingress.hostsList of hostnames["mcp.local"]
ingress.tlsTLS configuration for ingress[]

When ingress.path is not /, the annotation nginx.ingress.kubernetes.io/use-regex: "true" is automatically added.

Additionally, the chart injects the nginx.ingress.kubernetes.io/rewrite-target: /$2 annotation so that any configured path prefix is removed before traffic reaches the MCP server. This keeps the application serving from / and removes the need for container flags such as --path-prefix.

Environment variables

NameDescriptionValue
envEnvironment variables to be set on the container{}
envSecretsEnvironment variables from external secrets{}
secretEnvEnvironment variables to be set from created secret{}

Autoscaling parameters

NameDescriptionValue
autoscaling.enabledEnable Horizontal Pod Autoscaler (HPA)false
autoscaling.minReplicasMinimum number of MCP replicas1
autoscaling.maxReplicasMaximum number of MCP replicas100
autoscaling.targetCPUUtilizationPercentageTarget CPU utilization percentage80
autoscaling.targetMemoryUtilizationPercentageTarget Memory utilization percentage""

Configuration and installation details

Exposing the application

To access the MCP server from outside the cluster, you can:

  1. Use port forwarding (for development):

    kubectl port-forward svc/mcp-kubernetes 8080:8080
    
  2. Enable ingress (for production):

    ingress:
      enabled: true
      className: "nginx"
      path: /
      hosts:
        - mcp.your-domain.com
    
  3. Use LoadBalancer service type:

    service:
      type: LoadBalancer
    

Granting Kubernetes permissions

When mcp-kubernetes runs inside the cluster that it manages, it needs elevated Kubernetes API access. RBAC resources are created by default, granting full-cluster access through a release-scoped ClusterRole and ClusterRoleBinding. To reuse the built-in cluster-admin ClusterRole, set:

rbac:
  useClusterAdmin: true

To bind the service account to a pre-existing ClusterRole, specify its name instead:

rbac:
  existingClusterRole: my-mcp-role

When existingClusterRole is provided, the chart skips rendering a new ClusterRole and only creates the binding.

Troubleshooting

Check pod status

kubectl get pods -l app.kubernetes.io/name=mcp-kubernetes-helm

Check logs

kubectl logs -l app.kubernetes.io/name=mcp-kubernetes-helm

Test connection

helm test mcp-kubernetes

Deploy mcp-kubernetes with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mcp-kubernetes on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmcp-kubernetes is pinned at v0.2.7 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply