MCP
Kubernetes

Kubernetes

Deploy your agent to a Kubernetes cluster.

Before you begin

  1. Follow the Get started guide to set up agentregistry and start the agentregistry daemon.

  2. Publish an MCP server.

  3. Create a Kubernetes cluster. For example, you can use the following command to create a kind cluster.

    kind create cluster --name agentregistry
  4. Make sure that your current kubeconfig context points to the cluster that you want to use.

    kubectl config get-contexts
  5. Follow the Quickstart in the kagent OSS documentation. Agentregistry uses kagent for bootstrapping during an MCP server deployment.

  6. Local setups only: If you built the docker images locally without pushing them to a registry, load the MCP server image to your kind or minikube cluster. The following command assumes that you use kind and that your cluster is named agentregistry.

    kind load docker-image my-mcp-server:latest --name agentregistry 

Deploy the MCP server

  1. Deploy the MCP server to your cluster.

    arctl deployments create user/my-mcp-server \
     --type mcp \
     --provider-id kubernetes-default \
     --namespace default \
     --version 0.1.0

    Example output:

    Deploying server...
    
    Deployed user/my-mcp-server (v0.1.0) with providerId=local
    
    Server deployment recorded. The registry will reconcile containers automatically.
    Agent Gateway endpoint: http://localhost:21212/mcp
    
    If the deployment fails, a deployment entry is still created in the database and set to failed. You can view failed deployments by using the arctl deployments list command. Note that you cannot re-deploy a failed deployment to fix it. Instead, remove the failed deployment with arctl deployments delete <deployment-ID> and then re-run the arctl deployments create command.
  2. Verify that the MCP server is up and running.

    kubectl get pods | grep mcp    

    Example output:

    NAME                                           READY   STATUS    RESTARTS   AGE
    user-my-mcp-server-1a1a3db9-9b5fbbd94-5c6k9    1/1     Running              61s
    
  3. Optional: Review the MCPServer resource that was created in your cluster.

    kubectl get mcpserver -o yaml

Cleanup

You can remove a deployment from the UI or CLI.

  1. Open the agentregistry UI and go to the Deployed view.
  2. Find the MCP server deployment that you want to remove and click the trash icon.
  1. List the deployments in your environment and find the one that you want to delete.

    arctl deployments list
  2. Remove the deployment.

    arctl deployments delete <deployment-ID>