Upgrade Guide
Overview
This guide describes the procedure for upgrading the AgileTV CDN Manager (ESB3027) to a newer version. The upgrade process involves updating the Kubernetes cluster components and redeploying the Helm chart with the new version.
Prerequisites
Backup Requirements
Before beginning any upgrade, ensure you have:
- PostgreSQL Backup: Verify recent backups are available via the Cloudnative PG operator
- Configuration Backup: Save your current
values.yamlfile(s) - TLS Certificates: Ensure certificate files are backed up
- MaxMind Volumes: Note the current volume names if using GeoIP databases
Version Compatibility
Review the Release Notes for the target version to check for:
- Breaking changes requiring manual intervention
- Required intermediate upgrade steps
- New configuration options that should be set
Cluster Health
Verify the cluster is healthy before upgrading:
kubectl get nodes
kubectl get pods
kubectl get pvc
All nodes should show Ready status and all pods should be Running (or Completed for job pods).
Upgrade Methods
There are three upgrade methods available. Choose the one that best fits your situation:
| Method | Downtime | Use Case |
|---|---|---|
| Rolling Upgrade | Minimal | Patch releases; minor version upgrades; configuration updates |
| Clean Upgrade | Brief | Major version upgrades; component changes; troubleshooting |
| Full Reinstall | Extended | Cluster rebuilds; troubleshooting persistent issues; ensuring clean state |
Method Selection Guidance:
Rolling Upgrade (Method 1) is the default choice for most upgrades. Use this for patch releases (e.g., 1.6.0 → 1.6.1) and even minor version upgrades (e.g., 1.4.0 → 1.6.0) where no breaking changes are documented. This method preserves all existing resources and performs an in-place update. Note: This method supports Helm’s automatic rollback (
helm rollback) if the upgrade fails, allowing quick recovery to the previous state.Clean Upgrade (Method 2) is recommended for major version upgrades (e.g., 1.x → 2.x) or when the release notes indicate significant component changes. This method ensures all resources are recreated with the new version, avoiding potential issues with stale configurations. Also use this method when troubleshooting upgrade failures from Method 1.
Full Reinstall (Method 3) should only be used when a completely clean cluster state is required. This includes troubleshooting persistent cluster-level issues, recovering from failed upgrades that cannot be rolled back, or when migrating between significantly different deployment configurations. This method requires verified backups and should be planned for extended downtime.
Upgrade Steps
Method 1: Rolling Upgrade (Recommended)
This method performs an in-place rolling upgrade with minimal downtime.
Step 1: Obtain the New Installation ISO
Unmount the old ISO (if mounted) and mount the new installation ISO:
umount /mnt/esb3027 2>/dev/null || true
mount -o loop,ro esb3027-acd-manager-X.Y.Z.iso /mnt/esb3027
Replace X.Y.Z with the target version number.
Step 2: Review and Update Configuration
Compare the default values.yaml from the new ISO with your current configuration:
diff /mnt/esb3027/values.yaml ~/values.yaml
Update your configuration file to include any new required settings. Common updates include:
# ~/values.yaml
global:
hosts:
manager:
- host: manager.example.com
routers:
- name: director-1
address: 192.0.2.1
zitadel:
zitadel:
ExternalDomain: manager.example.com
# Add any new required settings for the target version
Important: Do not modify settings unrelated to the upgrade unless specifically documented in the release notes.
Step 3: Update MaxMind GeoIP Volumes (If Applicable)
If you use MaxMind GeoIP databases, use the utility from the new ISO to create an updated volume:
/mnt/esb3027/generate-maxmind-volume
Update your values.yaml to reference the new volume name:
manager:
maxmindDbVolume: maxmind-geoip-2026-04
Tip: Using dated or versioned volume names (e.g.,
maxmind-geoip-2026-04) allows you to create new volumes during upgrades and delete old ones after verification.
Step 4: Update TLS Certificates (If Needed)
If your TLS certificates need renewal or the new version requires certificate updates, create or update the secret:
kubectl create secret tls acd-manager-tls --cert=tls.crt --key=tls.key --dry-run=client -o yaml | kubectl apply -f -
Step 5: Upgrade the Helm Release
Perform a Helm upgrade with the new chart:
helm upgrade acd-manager /mnt/esb3027/helm/charts/acd-manager \
--values ~/values.yaml
Note: The upgrade performs a rolling update of each deployment in the chart. Deployments are upgraded one at a time, with pods being terminated and recreated sequentially. StatefulSets (PostgreSQL, Kafka, Redis) roll out one pod at a time to maintain data availability.
Monitor the upgrade progress:
kubectl get pods --watch
Wait for all pods to stabilize and show Running status before considering the upgrade complete. Some pods may temporarily enter CrashLoopBackoff during the transition as they wait for dependencies to become available.
Step 6: Verify the Upgrade
Check the deployed version:
helm list
kubectl get deployments -o wide
Verify application functionality:
- Access the MIB Frontend and confirm it loads
- Test API connectivity
- Verify Grafana dashboards are accessible
- Check that Zitadel authentication is working
Step 7: Clean Up
After confirming the upgrade is successful:
Unmount the old ISO (if still mounted):
umount /mnt/esb3027Delete old MaxMind volumes (if replaced):
kubectl get pvc kubectl delete pvc <old-volume-name>Remove old configuration files if no longer needed.
Method 2: Clean Upgrade (Helm Uninstall/Install)
This method removes the existing Helm release before installing the new version. This is useful for major version upgrades or when troubleshooting upgrade issues.
Warning: This method causes brief downtime as all resources are deleted before reinstallation.
Step 1: Obtain the New Installation ISO
Mount the new installation ISO on the primary server node:
umount /mnt/esb3027 2>/dev/null || true
mount -o loop,ro esb3027-acd-manager-X.Y.Z.iso /mnt/esb3027
Step 2: Backup Configuration
Save your current Helm values:
helm get values acd-manager -o yaml > ~/values-backup.yaml
Step 3: Uninstall the Existing Release
Remove the existing Helm release:
helm uninstall acd-manager
Wait for pods to terminate:
kubectl get pods --watch
Note: Helm uninstall does not remove PersistentVolumes (PVs) or PersistentVolumeClaims (PVCs). All data stored in PostgreSQL, Kafka, Redis, and Longhorn volumes is preserved during the uninstall process. When the new version is installed, it will reattach to the existing PVCs and restore data automatically.
Step 4: Review and Update Configuration
Compare the default values.yaml from the new ISO with your configuration:
diff /mnt/esb3027/values.yaml ~/values.yaml
Update your configuration file as needed.
Step 5: Install the New Release
Install the new version:
helm install acd-manager /mnt/esb3027/helm/charts/acd-manager \
--values ~/values.yaml
Monitor the deployment:
kubectl get pods --watch
Wait for all pods to stabilize before proceeding.
Step 6: Verify the Upgrade
Verify the upgrade as described in Method 1, Step 7.
Method 3: Full Reinstall (Cluster Rebuild)
This method completely removes Kubernetes and reinstalls from scratch. Use only for cluster rebuilds or when other upgrade methods fail.
Warning: This method causes extended downtime and permanent data loss. The K3s uninstall process destroys all Longhorn PersistentVolumes (PVs) and PersistentVolumeClaims (PVCs). All data stored in PostgreSQL, Kafka, Redis, and application volumes will be permanently lost. Verified backups are required before proceeding.
Warning: This method should only be used when necessary. Ensure you have verified backups before proceeding.
Step 1: Stop Kubernetes Services
On all nodes (server and agent), stop the K3s service:
systemctl stop k3s
Step 2: Uninstall K3s (Server Nodes Only)
On the primary server node first, then each additional server node:
/usr/local/bin/k3s-uninstall.sh
Step 3: Clean Up Residual State (All Nodes)
On all nodes, remove residual state:
/usr/local/bin/k3s-kill-all.sh
rm -rf /var/lib/rancher/k3s/*
Warning: This removes all cluster data including Longhorn PersistentVolumes (PVs) and PersistentVolumeClaims (PVCs). All data stored in PostgreSQL, Kafka, Redis, and application volumes will be permanently lost. Ensure verified backups are available before proceeding.
Step 4: Reinstall K3s Cluster
Follow the installation procedure from the beginning:
- Primary Server: Run
/mnt/esb3027/install - Additional Servers: Join with
/mnt/esb3027/join-server - Agent Nodes: Join with
/mnt/esb3027/join-agent
Note: The K3s node token is regenerated during reinstallation. Any previously saved tokens from the old deployment will no longer be valid. Retrieve the new token from /var/lib/rancher/k3s/server/node-token on the primary server after installation.
Step 5: Reinstall MaxMind Volumes (If Applicable)
Recreate MaxMind GeoIP volumes:
/mnt/esb3027/generate-maxmind-volume
Step 6: Deploy the Helm Chart
Deploy the new version:
helm install acd-manager /mnt/esb3027/helm/charts/acd-manager \
--values ~/values.yaml
Step 7: Verify the Installation
Verify all pods are running:
kubectl get pods
Verify application functionality as described in Method 1, Step 6.
Rollback Procedure
Rollback procedures vary by upgrade method:
Method 1 (Rolling Upgrade)
Use Helm’s built-in rollback command:
helm rollback acd-manager
This reverts to the previous Helm release revision automatically.
Or manually redeploy the previous version:
helm upgrade acd-manager /mnt/esb3027-old/helm/charts/acd-manager \
--values ~/values.yaml
Note: If you use multiple --values files for organization, ensure they are specified in the same order as the original installation.
Method 2 (Clean Upgrade)
Reinstall the previous version:
helm uninstall acd-manager
helm install acd-manager /mnt/esb3027-old/helm/charts/acd-manager \
--values ~/values-backup.yaml
Method 3 (Full Reinstall)
Rollback requires repeating the full cluster reinstall procedure using the old installation ISO. Follow Method 3 steps with the previous version’s ISO. Ensure verified backups are available before attempting.
Troubleshooting
Pods Fail to Start
Check pod status and events:
kubectl describe pod <pod-name> kubectl get events --sort-by='.lastTimestamp'Review pod logs:
kubectl logs <pod-name> kubectl logs <pod-name> -p # Previous instance logs
Database Migration Issues
If PostgreSQL migrations fail:
Check Cloudnative PG cluster status:
kubectl get clusters kubectl describe cluster <cluster-name>Review migration job logs:
kubectl get jobs kubectl logs job/<migration-job-name>
Helm Upgrade Fails
If helm upgrade fails:
Check Helm release status:
helm status acd-manager helm history acd-managerReview the error message for specific failures
Attempt rollback if necessary
Post-Upgrade
After a successful upgrade:
- Review the Release Notes for any post-upgrade tasks
- Update monitoring dashboards if new metrics are available
- Test all critical functionality
- Document the upgrade in your change management system
Next Steps
After completing the upgrade:
- Next Steps Guide - Review post-installation tasks
- Operations Guide - Day-to-day operational procedures
- Release Notes - Review new features and changes