Helm Chart README
Dating App Helm Chart
This Helm chart deploys the MVP dating application to Kubernetes with all necessary components.
Prerequisites
- Kubernetes 1.19+
- Helm 3.0+
- Nginx Ingress Controller (for ingress)
- Storage provisioner (for PVC)
Installation
Basic Installation (Development)
# Install with default values
helm install dating-app ./helm/dating-app -n dating-app --create-namespace
Production Installation with Custom Values
# Create custom values file
cp helm/dating-app/values.yaml my-values.yaml
# Edit my-values.yaml with your configuration
# Then install
helm install dating-app ./helm/dating-app -n dating-app --create-namespace -f my-values.yaml
Configuration
Edit values.yaml to customize:
Ingress Hosts
backend:
ingress:
host: api.yourdomain.com
frontend:
ingress:
host: app.yourdomain.com
Database
postgres:
credentials:
username: your_user
password: your_password
database: your_db
Backend Environment
backend:
environment:
JWT_SECRET: your-secret-key
CORS_ORIGINS: "https://app.yourdomain.com"
Frontend API URL
frontend:
environment:
VITE_API_URL: "https://api.yourdomain.com"
Storage Classes
For cloud deployments (AWS, GCP, etc.), specify storage class:
backend:
persistence:
storageClass: ebs-sc # AWS EBS
size: 10Gi
postgres:
persistence:
storageClass: ebs-sc
size: 20Gi
Replicas and Resources
backend:
replicas: 3
resources:
requests:
memory: "512Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "500m"
frontend:
replicas: 2
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "200m"
Upgrading
helm upgrade dating-app ./helm/dating-app -f my-values.yaml
Uninstalling
helm uninstall dating-app -n dating-app
AWS Migration
To deploy to AWS:
- RDS for PostgreSQL: Disable postgres in chart
postgres:
enabled: false
- Update database URL to RDS endpoint
backend:
environment:
DATABASE_URL: "postgresql://user:password@your-rds-endpoint:5432/dating_app"
- S3 for Media Storage: Update backend environment
backend:
environment:
MEDIA_STORAGE: s3
S3_BUCKET: your-bucket
AWS_REGION: us-east-1
- Use AWS Load Balancer Controller for ingress
ingress:
className: aws-alb
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
- Use EBS for persistent storage
backend:
persistence:
storageClass: ebs-sc
Troubleshooting
Check pod status:
kubectl get pods -n dating-app
kubectl logs -n dating-app <pod-name>
Check services:
kubectl get svc -n dating-app
Check ingress:
kubectl get ingress -n dating-app
Port forward for debugging:
kubectl port-forward -n dating-app svc/backend 8000:8000
kubectl port-forward -n dating-app svc/frontend 3000:80
Database Initialization
The backend automatically initializes tables on startup. To verify:
kubectl exec -it -n dating-app <postgres-pod> -- psql -U dating_user -d dating_app -c "\dt"
Notes
- This chart is designed to be portable between on-premises and cloud deployments
- Modify
values.yamlfor your specific infrastructure - For production, use external secrets management (HashiCorp Vault, AWS Secrets Manager, etc.)
- Enable TLS/SSL with cert-manager for production ingress
- Configure proper backup strategies for PostgreSQL PVC