Hi there,
We have Metabase deployed on Kubernetes through helm, but every time we try to update the version of Metabase we are facing a multitude of issues related to Migrations, such as shutdowns, db locks etc.
Are there any official recommendations for how to deal with updates and migrations when running in k8s?
We only have a single pod running and Metabase is connected to a MySQL production DB
There is no official helm chart for metabase but what issues exactly are you having issues with, can you share some logs?
If it's really as you are describing then why would you need a helm chart? The setup should be pretty simply a pod like this should work for you
apiVersion: apps/v1
kind: Deployment
metadata:
name: metabase
labels:
app: metabase
spec:
replicas: 1
selector:
matchLabels:
app: metabase
template:
metadata:
labels:
app: metabase
spec:
containers:
- name: metabase
imagePullPolicy: Always
# image: metabase/metabase:latest
image: metabase/metabase:v0.49.13
envFrom:
- configMapRef:
name: metabase-config
ports:
- containerPort: 3000
livenessProbe:
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 150
periodSeconds: 20
---
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
name: metabase-health-default
spec:
healthCheck:
checkIntervalSec: 30
timeoutSec: 10
requestPath: /api/health
Then just take care of the configMAP:
apiVersion: v1
kind: ConfigMap
metadata:
name: metabase-config
data:
MB_DB_TYPE: "mysql"
MB_DB_DBNAME: "metabase" # speficy DB name
MB_DB_PORT: "3306"
MB_DB_USER: "mysql_user" # specify DB user
MB_DB_PASS: "mysql_password" # specify DB password
MB_DB_HOST: "your MySQL production DB host"
# MB_DB_AUTOMIGRATE: "false"