This directory contains example manifests for deploying Frappe using the operator with MariaDB Operator integration.
The Frappe Operator uses MariaDB Operator for secure database provisioning:
# Install MariaDB Operator CRDs
kubectl apply -f https://github.com/mariadb-operator/mariadb-operator/releases/latest/download/crds.yaml
# Install MariaDB Operator
kubectl apply -f https://github.com/mariadb-operator/mariadb-operator/releases/latest/download/mariadb-operator.yaml
kubectl apply -f https://github.com/vyogotech/frappe-operator/releases/latest/download/install.yaml
# Step 1: Create shared MariaDB instance (one time)
kubectl apply -f mariadb-shared-instance.yaml
# Wait for MariaDB to be ready
kubectl wait --for=condition=Ready mariadb/frappe-mariadb --timeout=300s
# Step 2: Create a bench
kubectl apply -f basic-bench.yaml
# Wait for bench to be ready
kubectl wait --for=condition=Ready frappebench/dev-bench --timeout=300s
# Step 3: Create a site
kubectl apply -f basic-site.yaml
# Wait for site database to be provisioned
kubectl wait --for=condition=Ready database/dev-site-db --timeout=120s
# Wait for site to be ready
kubectl wait --for=condition=Ready frappesite/dev-site --timeout=300s
# Get auto-generated admin password
kubectl get secret dev-site-admin -o jsonpath='{.data.password}' | base64 -d
# Create bench (if not already created)
kubectl apply -f basic-bench.yaml
# Create site with dedicated MariaDB
kubectl apply -f site-dedicated-mariadb.yaml
# The operator automatically creates:
# - Dedicated MariaDB instance
# - Database and user
# - All necessary credentials
# Step 1: Deploy shared MariaDB with HA
kubectl apply -f mariadb-shared-instance.yaml
# Step 2: Deploy sites with TLS
kubectl apply -f site-shared-mariadb.yaml
mariadb-shared-instance.yaml - Shared MariaDB for multiple sites (cost-effective)basic-bench.yaml - Simple bench with default settingsbasic-site.yaml - Site using shared MariaDB (development)site-with-apps.yaml - NEW: Site with specific apps (erpnext, hrms)site-shared-mariadb.yaml - Site with shared MariaDB (production)site-dedicated-mariadb.yaml - Site with dedicated MariaDB (enterprise)autoscaling-bench.yaml - NEW: Bench with provider-agnostic autoscaling (KEDA for workers, HPA for nginx)advanced-pod-config.yaml - NEW: Advanced Pod Configuration (Labels, Geo-tagging, Affinity)hybrid-bench.yaml - Bench with hybrid app installationfpm-bench.yaml - Bench using FPM packagesmariadb-connection-secret.yaml - Legacy secret-based DB connectionKey configuration options:
frappeVersion - Frappe version (e.g., “version-15”, “version-14”)imageConfig - Custom container imagesapps - List of apps to installcomponentAutoscaling - NEW: Provider-agnostic autoscaling for all components
nginx, gunicorn, socketio, worker-short, worker-long, worker-defaultenabled, provider (keda/hpa), minReplicas, maxReplicas, staticReplicaskeda - KEDA specific config (trigger, targetValue, metadata)hpa - HPA specific config (metric, targetUtilization)podConfig - NEW: Advanced pod configuration
labels - Custom labels for all podsgeoTag - Simplified region/zone configuration (sets topology labels and affinity)affinity - Custom pod affinity/anti-affinitynodeSelector - Node selection constraintstolerations - Pod tolerationscomponentResources - CPU/memory for each componentstorageSize - PVC size (default: 10Gi)storageClassName - Storage class to usedomainConfig - Domain resolution settingsKey configuration options:
benchRef - Reference to FrappeBenchsiteName - Site domain nameapps - NEW: List of apps to install (checked against container filesystem, missing apps skipped gracefully)adminPasswordSecretRef - Admin password secret (optional, auto-generates if not provided)dbConfig - Database configurationdomain - External domaintls - TLS configurationingress - Ingress settingsFor details on app installation, see Site App Installation Guide.
.localhost or .local domainsqueueLength based on workloadminReplicas: 0 for scale-to-zero on bursty workloadsminReplicas: 1+ for consistent background processingkubectl get frappebench -A
kubectl describe frappebench <name>
kubectl get frappesite -A
kubectl describe frappesite <name>
# Operator logs
kubectl logs -n frappe-operator-system deployment/frappe-operator-controller-manager -c manager
# Site init job logs
kubectl logs job/<site-name>-init
# Application logs
kubectl logs deployment/<bench-name>-gunicorn
# Worker autoscaling logs
kubectl logs deployment/<bench-name>-worker-short
kubectl logs deployment/<bench-name>-worker-long
# Check ScaledObjects (KEDA)
kubectl get scaledobjects
# Check component scaling status
kubectl get frappebench <bench-name> -o jsonpath='{.status.componentScaling}' | jq
# Check HPA created by KEDA
kubectl get hpa
# Check queue length
kubectl exec deployment/<bench-name>-redis-queue -- redis-cli LLEN "rq:queue:short"
kubectl get job <site-name>-initkubectl logs job/<site-name>-initkubectl get pvckubectl get storageclass