Kubernetes Deployment
The GOVERN Helm chart is the recommended way to deploy GOVERN to Kubernetes. It supports all major distributions (EKS, AKS, GKE, OpenShift, bare metal).
Prerequisites
- Kubernetes 1.28+
- Helm 3.14+
- Persistent volume provisioner
- Ingress controller (nginx-ingress recommended)
- PostgreSQL 15+ (or use bundled)
- Redis 7+ (or use bundled)
Add Helm Repository
helm repo add govern https://charts.govern.archetypal.aihelm repo updateMinimal Install
# Install with bundled PostgreSQL and Redis (not recommended for production)helm install govern govern/govern \ --namespace govern \ --create-namespace \ --set global.licenseKey=$GOVERN_LICENSE_KEYProduction Install
# Create namespace and secretskubectl create namespace govern
kubectl create secret generic govern-secrets \ --namespace govern \ --from-literal=api-key=$GOVERN_API_KEY \ --from-literal=secret-key=$GOVERN_SECRET_KEY \ --from-literal=db-password=$DB_PASSWORD \ --from-literal=redis-password=$REDIS_PASSWORD
# Install GOVERNhelm install govern govern/govern \ --namespace govern \ --values values-production.yamlvalues-production.yaml
global: licenseKey: "" # Set via --set or secret
api: replicas: 2 resources: requests: cpu: 500m memory: 512Mi limits: cpu: 2000m memory: 2Gi
app: replicas: 2 resources: requests: cpu: 100m memory: 128Mi limits: cpu: 500m memory: 512Mi
# External PostgreSQLpostgresql: enabled: false # Disable bundled PostgreSQL external: host: postgres.internal.company.com port: 5432 database: govern username: govern existingSecret: govern-secrets secretKey: db-password
# External Redisredis: enabled: false # Disable bundled Redis external: host: redis.internal.company.com port: 6379 existingSecret: govern-secrets secretKey: redis-password
ingress: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - host: govern.company.com paths: - path: / pathType: Prefix tls: - secretName: govern-tls hosts: - govern.company.com
autoscaling: enabled: true minReplicas: 2 maxReplicas: 10 targetCPUUtilizationPercentage: 70
persistence: storageClass: standard # Your StorageClass name size: 50GiUpgrading
# Pull latest charthelm repo update
# Preview changeshelm diff upgrade govern govern/govern --namespace govern --values values-production.yaml
# Apply upgradehelm upgrade govern govern/govern \ --namespace govern \ --values values-production.yaml \ --wait \ --timeout 10mMonitoring
GOVERN exposes Prometheus metrics at /metrics. Configure scraping:
# values addition for Prometheusapi: metrics: enabled: true serviceMonitor: enabled: true # Requires Prometheus Operator namespace: monitoring interval: 30sVerifying Deployment
# Check pod statuskubectl get pods -n govern
# Check eventskubectl get events -n govern --sort-by=.lastTimestamp
# Check healthkubectl exec -n govern deployment/govern-api -- curl -s localhost:3001/health | jq .
# View logskubectl logs -n govern deployment/govern-api --tail=100 -f