Skip to main content

Rollback procedures


If something goes wrong after an upgrade, you can rollback to a previous version.

When to rollback

Consider rolling back if you observe:
  • Pods failing to start or crash-looping
  • API errors or service unavailability
  • Data inconsistencies
  • Performance degradation

Check release history

View the revision history for a release:
helm history midaz -n midaz
Example output:
REVISION  STATUS      CHART           APP VERSION  DESCRIPTION
1         superseded  midaz-4.4.8     3.4.7        Install complete
2         deployed    midaz-5.7.0     3.5.3        Upgrade complete

Execute rollback

Rollback to a specific revision:
  • Rollback Midaz to previous revision
helm rollback midaz 1 -n midaz
  • Rollback plugin (example: CRM)
helm rollback plugin-crm 1 -n midaz

Verify rollback

  • Verify release version
helm list -n midaz
  • Verify pods
kubectl get pods -n midaz
  • Check logs
kubectl logs -n midaz deployment/midaz-ledger --tail=50
Rollbacks may not revert database schema changes. If the upgrade included database migrations, you may need to restore from a database backup.

Troubleshooting


Pods stuck in Pending state

Symptom: Pods remain in Pending status after upgrade. Solution: Check for resource constraints:
  • Describe pending pod
kubectl describe pod <pod-name> -n midaz
  • Check node resources
kubectl top nodes

Image pull errors

Symptom: Pods show ImagePullBackOff or ErrImagePull. Solution: Verify image registry access and credentials:
  • Check pod events
kubectl describe pod <pod-name> -n midaz | grep -A 10 Events
  • Verify image exists
docker pull lerianstudio/midaz-ledger:3.5.3

Configuration errors

Symptom: Pods crash with configuration-related errors in logs. Solution: Compare your values with the new defaults:
  • View current values
helm get values midaz -n midaz
  • View chart defaults
helm show values oci://registry-1.docker.io/lerianstudio/midaz-helm --version 5.7.0

Database connection issues

Symptom: Services fail to connect to PostgreSQL or MongoDB. Solution: Verify database connectivity and credentials:
  • Check database pods
kubectl get pods -n midaz -l app.kubernetes.io/name=postgresql
kubectl get pods -n midaz -l app.kubernetes.io/name=mongodb
  • Check service logs
kubectl logs -n midaz deployment/midaz-ledger | grep -i database

General rollback procedure


If you encounter issues after any upgrade:
# List release history
helm history midaz -n midaz

# Rollback to previous version
helm rollback midaz <REVISION> -n midaz

# Verify rollback
helm list -n midaz
kubectl get pods -n midaz