Skip to main content
Version Next

Upgrade via Helm

This guide describes how to upgrade TDP Kubernetes components using the Helm CLI.
Upgrading with Helm lets you apply new chart versions, update settings, and keep the environment aligned with the latest releases.


Upgrade preparation

Before you start any upgrade, run the checks below for a safe process.

Check current versions

List all releases installed in the namespace to see the current versions:

Terminal input
helm list -n <namespace>
Figure 1 - Helm releases
Figure 1 - Helm releases

The output shows the release name, namespace, revision, status, chart, and application version.

Check pods and workload readiness

Confirm workloads are ready in the target namespace before you continue:

Terminal input
kubectl get pods -n <namespace>
kubectl get statefulset -n <namespace>
Figure 2 - kubectl get pods
Figure 2 - kubectl get pods
Figure 3 - kubectl get statefulset
Figure 3 - kubectl get statefulset

If the app uses a Deployment, validate that as well:

Terminal input
kubectl get deploy -n <namespace>

What to validate:

  • Pods show STATUS Running
  • The pods READY column is complete, for example 1/1
  • StatefulSets or Deployments show all replicas ready, for example 1/1, 2/2, or 3/3

Why validate before upgrading:

  • Ensure the application is already stable before the change
  • Avoid confusing an existing failure with one caused by the upgrade
  • Reduce the risk of downtime during the process

Back up current values

Export the current values for each release so you can roll back if something fails:

Terminal input
helm get values <release> -n <namespace> -o yaml > <release>-values-backup.yaml

Repeat this command for every release you will upgrade.

Back up persistent volumes

caution

Before any upgrade, back up persistent data. If a serious failure occurs, you will need those backups to recover.

  1. Identify the component PVCs:

    Terminal input
    kubectl get pvc -n <namespace> -l app.kubernetes.io/instance=<release>
Figure 4 - kubectl get pvc
Figure 4 - kubectl get pvc
  1. Create persistent volume snapshots (if the StorageClass supports it):

    Terminal input
    kubectl apply -f - <<EOF
    apiVersion: snapshot.storage.k8s.io/v1
    kind: VolumeSnapshot
    metadata:
    name: <release>-snapshot
    namespace: <namespace>
    spec:
    volumeSnapshotClassName: <snapshot-class>
    source:
    persistentVolumeClaimName: <pvc-name>
    EOF
  2. Check snapshot status:

    Terminal input
    kubectl get volumesnapshot -n <namespace>

Upgrade CRDs

warning

CRDs must be upgraded before the other components. They are cluster-scoped resources and are not managed automatically by Helm during upgrade.

Upgrade Argo CD CRDs before any other component:

Terminal input
helm upgrade tdp-argo-crds oci://registry.tecnisys.com.br/tdp/charts/tdp-argo-crds \
-n <namespace> \
-f values-argo-crds.yaml

Wait for it to finish and verify the CRDs were updated:

Terminal input
kubectl get crds | grep argoproj.io