Kubernetes Deployment with Helm
Deploy ZenML server on Kubernetes for production-grade, scalable MLOps infrastructure. ZenML provides official Helm charts that simplify deployment and management on Kubernetes clusters.Prerequisites
Before deploying ZenML on Kubernetes, ensure you have:Kubernetes Cluster
Running cluster with kubectl access (v1.19+)
Helm
Helm 3.x installed and configured
Ingress Controller
Nginx, Traefik, or similar (optional but recommended)
Storage Class
Default StorageClass for persistent volumes
Quick Start
Install ZenML Helm Chart
Deploy ZenML server with default configuration:- ZenML server on port 80
- SQLite database (for testing)
- No ingress (ClusterIP service)
- No authentication
Verify Installation
Check deployment status:Access the Server
Port-forward to access locally:http://localhost:8080
Production Deployment
For production environments, create a customvalues.yaml file:
Deploy with Custom Values
Database Configuration
Using External MySQL
Recommended for production. Use managed database services:AWS RDS
Managed MySQL on AWS
Google Cloud SQL
Managed MySQL on GCP
Azure Database
Managed MySQL on Azure
AWS RDS Example
Google Cloud SQL Example
Database Persistence (SQLite)
For development/testing only:Secrets Management
AWS Secrets Manager
GCP Secret Manager
Azure Key Vault
HashiCorp Vault
Ingress Configuration
Nginx Ingress
Traefik Ingress
Custom Path (Behind Proxy)
SSL/TLS Configuration
Using cert-manager
Install cert-manager:Self-Signed Certificates
Custom CA Certificates
Add custom CA certificates for internal services:High Availability Setup
Multiple Replicas
Pod Disruption Budget
Create PodDisruptionBudget:Horizontal Pod Autoscaling
Monitoring and Logging
Prometheus Metrics
Enable Prometheus monitoring:Logging Configuration
Health Checks
Upgrade and Rollback
Upgrade ZenML
Rollback Deployment
Backup and Recovery
Database Backup
Configure automatic backups:Manual Backup
Restore from Backup
Troubleshooting
Pod Not Starting
Check pod status and events:Database Connection Issues
Test database connectivity:Ingress Not Working
Check ingress configuration:View Server Logs
Performance Tuning
Resource Optimization
Database Connection Pooling
Request Handling
Security Best Practices
Use RBAC
Enable Kubernetes RBAC for service account permissions
Network Policies
Restrict pod-to-pod communication with NetworkPolicies
Secret Encryption
Enable encryption at rest for Kubernetes Secrets
Pod Security
Use Pod Security Standards (restricted profile)
Image Scanning
Scan container images for vulnerabilities
TLS Everywhere
Use TLS for all network communications
Next Steps
Docker Deployment
Alternative Docker-based deployment
Configuration Guide
Advanced server configuration
Security Setup
Secure your deployment
