Kubernetes Basics
Quick start guide for deploying Elsa Workflows to Kubernetes with PostgreSQL persistence, including configuration, troubleshooting, and production best practices.
Overview
Prerequisites
Understanding the elsa-core Kubernetes Manifests
Typical Manifest Structure
What the Manifests Provide
Default Configuration: SQLite
Switching to PostgreSQL
Step 1: Deploy PostgreSQL (Optional)
Step 2: Update Elsa Server Configuration
Option A: Environment Variables
Option B: ConfigMap and appsettings.json
Step 3: Configure Persistence in Program.cs
Why Changing Only the Connection String Isn't Enough
Running Database Migrations
Option 1: Init Container
Option 2: Auto-Migration on Startup
Option 3: Kubernetes Job
Troubleshooting
Problem: Elsa Still Uses SQLite
Problem: Connection Refused or Timeout
Problem: Tables Not Created
Problem: Missing Environment Variables
Problem: ConfigMap Not Mounted
Verifying PostgreSQL is Being Used
1. Check Logs
2. Check Database Tables
3. Create a Test Workflow
Production Best Practices
1. Use Managed PostgreSQL
2. Separate Database User Permissions
3. Use Connection Pooling
4. Enable TLS for Database Connections
5. Implement Health Checks
6. Set Resource Limits
7. Production Scaling Considerations
Next Steps
Related Documentation
Last updated