Skip to main content

Deploy with Kubernetes

Deploy WeaveMCP agents on Kubernetes for production-grade scalability, reliability, and management.

Prerequisites

  • Kubernetes cluster (1.19+)
  • kubectl configured to access your cluster
  • WeaveMCP account with virtual server created
  • Agent token generated from the web console

Quick Deployment

1. Create Namespace

2. Create Secret

Store your agent token securely:

3. Create ConfigMap

Create mcp-servers-config.yaml:
Apply the ConfigMap:

4. Create Deployment

Create agent-deployment.yaml:

5. Create Persistent Volumes

Create persistent-volumes.yaml:

6. Create Service

Create agent-service.yaml:

7. Deploy Everything

Production Configuration

Horizontal Pod Autoscaler

Create hpa.yaml:

Pod Disruption Budget

Create pdb.yaml:

Network Policy

Create network-policy.yaml:

Monitoring Integration

ServiceMonitor for Prometheus

Create service-monitor.yaml:

Grafana Dashboard

Use our pre-built Grafana dashboard:

Advanced Features

Multi-Region Deployment

Deploy across multiple regions for high availability:

Custom Resource Definitions

Define custom MCP server configurations:

Operations

Health Monitoring

Check agent health:

Scaling

Scale the deployment:

Updates

Rolling updates:

Backup and Restore

Backup persistent data:

Troubleshooting

Security Best Practices

  1. Use specific image tags: Avoid latest in production
  2. Run as non-root: Set runAsNonRoot: true
  3. Read-only filesystem: Use readOnlyRootFilesystem: true
  4. Resource limits: Always set CPU and memory limits
  5. Network policies: Restrict network access
  6. Secret management: Use external secret management systems
  7. Pod security standards: Implement Pod Security Standards
  8. Regular updates: Keep images and Kubernetes updated

Next Steps

Monitoring Setup

Set up comprehensive monitoring and alerting

Multi-Cluster

Deploy across multiple Kubernetes clusters

GitOps Integration

Manage deployments with GitOps workflows

Custom Operators

Build custom Kubernetes operators for WeaveMCP