Quickstart
This quickstart creates an MCPServer resource and verifies that the operator creates the backing Kubernetes Deployment and Service.
TOC
PrerequisitesCreate an MCPServerVerify the MCPServerTest the EndpointUpdate the Port or PathCommon ConfigurationClean UpPrerequisites
- Alauda Build of MCP Lifecycle Operator is installed. See Installation.
kubectlis configured for the target cluster.- An MCP server image has been pushed to a registry that the target cluster can pull from.
Create an MCPServer
Apply an MCPServer resource. The current API supports only ContainerImage for spec.source.type. Replace <registry>/<project>/<mcp-server-image>:<tag> with an MCP server image that exposes the MCP HTTP endpoint on the configured port. For example, the upstream MCP Lifecycle Operator sample uses quay.io/containers/kubernetes_mcp_server:latest; use that image only when the target cluster can pull from quay.io.
The operator creates a Deployment and a Service named kubernetes-mcp-server in the same namespace.
Verify the MCPServer
Check the MCPServer status:
Expected output from kubectl get mcpservers:
The ADDRESS column is the cluster-internal MCP endpoint that other workloads can call.
Verify the managed resources:
The Deployment should be available, the Service should exist, and the pods should be Running.
Test the Endpoint
Forward the generated Service:
In another terminal, test the server:
The exact response depends on the MCP server image. A reachable endpoint confirms that the operator-created Service routes traffic to the MCP server pod.
Update the Port or Path
The default MCP path is /mcp. To set it explicitly or change the port, update spec.config:
After reconciliation, verify the updated address:
Common Configuration
Use spec.config for container-level settings such as arguments, environment variables, and mounted configuration:
The referenced ConfigMaps and Secrets must exist in the same namespace as the MCPServer.
Use spec.runtime to configure the generated Deployment:
Use spec.runtime.security when the MCP server needs a specific Kubernetes service account or hardened pod settings:
If the MCP server does not keep per-client session state, set spec.mcp.stateless: true so the generated Service can load balance freely across replicas:
Clean Up
Delete the MCPServer resource:
The operator removes the managed Deployment and Service.