Deploy a remote MCP server on Kubernetes with containers, Services, Ingress, secrets, health checks, scaling, observability, and least-privilege security.
You can deploy a remote MCP server on Kubernetes when you need repeatable releases, horizontal scaling, service discovery, centralized secrets, and production observability.A typical deployment places a Streamable HTTP MCP server behind a Kubernetes Service and an HTTPS ingress or gateway.
MCP client -> HTTPS ingress -> Service -> MCP server Pods -> API
A liveness probe only for unrecoverable process failure
Do not make a liveness probe depend on every upstream API. A dependency outage should not cause Kubernetes to restart all healthy server processes repeatedly.
Most API-backed MCP servers do not need access to the Kubernetes API. Disable automatic service-account token mounting when it is unnecessary.If the server does manage cluster resources:
Create a dedicated service account
Prefer namespace-scoped Roles
Grant only required verbs and resources
Avoid wildcards
Avoid cluster-admin
Audit every tool that changes cluster state
An AI application can request any Kubernetes action allowed by the server’s identity. Start with read-only tools and narrow RBAC permissions.