Rollback
This guide describes how to revert upgrades of TDP Kubernetes components, via Helm or ArgoCD. Rollback lets you quickly restore a previous version after failures or unexpected behavior following an upgrade.
Before any rollback, back up persistent data. Depending on the component, a rollback can cause data loss if schema migrations are incompatible with earlier versions.
Data backup before rollback
Before starting rollback, protect persistent data by creating PVC snapshots.
Identify the component’s PVCs
kubectl get pvc -n <namespace> -l app.kubernetes.io/instance=<release>
Create volume snapshots
kubectl apply -f - <<EOF
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
name: <release>-pre-rollback-snapshot
namespace: <namespace>
spec:
volumeSnapshotClassName: <snapshot-class>
source:
persistentVolumeClaimName: <pvc-name>
EOF
Check snapshot status
kubectl get volumesnapshot -n <namespace>
Ensure the snapshot has readyToUse: true before proceeding.
Rollback via Helm
List revision history
Use helm history to list all revisions of a release:
helm history <release> -n <namespace>
The output shows columns: REVISION, UPDATED, STATUS, CHART, APP VERSION, and DESCRIPTION. Identify the revision to roll back to.
Example output:
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION
1 2025-01-15 10:30:00 deployed tdp-kafka-1.0.0 3.5.1 Install complete
2 2025-02-10 14:00:00 superseded tdp-kafka-1.0.0 3.5.1 Upgrade complete
3 2025-03-01 09:15:00 deployed tdp-kafka-2.0.0 3.6.0 Upgrade complete
Roll back to a specific revision
To revert to a specific revision:
helm rollback <release> <revisao> -n <namespace>
For example, to roll tdp-kafka back to revision 2:
helm rollback tdp-kafka 2 -n <namespace>
Roll back to the previous revision
To revert to the immediately previous revision (without specifying the number):
helm rollback <release> -n <namespace>