Skip to main content

Overview

Deploy the MCP Server with LangGraph on Kubernetes for production-grade reliability, scalability, and high availability. This guide covers deployment with Keycloak SSO, Redis sessions, OpenFGA authorization, and observability.
v2.4.0 includes updated infrastructure (OpenFGA v1.10.2, Keycloak 26.4.0, PostgreSQL 16), production-ready Kubernetes manifests with Keycloak, Redis, and comprehensive security configurations.

Architecture

Prerequisites

1

Kubernetes Cluster

Minimum requirements:
  • Kubernetes 1.25+
  • 4 vCPUs, 8GB RAM
  • 50GB storage
  • kubectl configured
Recommended:
  • 8+ vCPUs, 16GB+ RAM
  • 100GB+ SSD storage
  • Multi-zone cluster
  • Auto-scaling enabled
2

Container Registry

Build and push the Docker image:
Update deployments/kubernetes/base/deployment.yaml:
3

Install Tools

Quick Deploy

Step-by-Step Deployment

1. Namespace and RBAC

2. Configuration

ConfigMap for application configuration:
Secrets for sensitive data:
Never commit secrets to Git! Use external secret managers (see Infisical Setup) or cloud-native solutions (GCP Secret Manager, AWS Secrets Manager, Azure Key Vault).

3. Deploy Keycloak

See Keycloak SSO Guide for detailed setup.

4. Deploy Redis

See Redis Sessions Guide for details.

5. Deploy OpenFGA

6. Deploy Application

7. Configure Ingress

High Availability

Horizontal Pod Autoscaling

Pod Disruption Budget

Pod Anti-Affinity

Spread pods across availability zones:

Security

Network Policies

Pod Security Standards

Security Context

Observability

Prometheus Metrics

Deploy Prometheus:

OpenTelemetry

Deploy OpenTelemetry Collector:

Jaeger Tracing

Access Jaeger UI:

Health Checks

The deployment includes comprehensive health checks:
Check health:

Troubleshooting

Next Steps

Helm Deployment

Deploy using Helm charts

Production Checklist

Pre-deployment verification

Scaling Guide

Auto-scaling and performance tuning

Disaster Recovery

Backup and restore procedures

Production Ready: Your MCP Server is now running on Kubernetes with high availability and enterprise-grade security!