Skip to main content
Version 3.0

Update via Helm

CompatibilityKubernetes1.32+OpenShift4.19+Rancher2.10.x+Helm3.2.0+

This guide describes the process of upgrading TDP Kubernetes components using the Helm CLI.
Updating via Helm allows you to apply new versions of charts, update configurations and ensure that the environment is always aligned with the most recent versions.


Update Preparation

Before starting any update, perform the checks below to ensure a safe process.

Check Current Versions

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

Terminal input
helm list -n <NAMESPACE>
Figure 1 - Helm Releases
Figure 1 - Helm Releases

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

Check pods and workload readiness

Verify that your workloads are ready in the target namespace before proceeding:

Terminal input
kubectl get pods -n <NAMESPACE>
kubectl get statefulset -n <NAMESPACE>
Figure 2 - Get Pods
Figure 2 - Get Pods
Figure 3 - Get Statefulset
Figure 3 - Get Statefulset

If the application uses Deployment, also validate:

Terminal input
kubectl get deploy -n <NAMESPACE>

What to validate:

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

Why validate before updating:

  • Ensure that the application is already stable before the change
  • Avoid confusing previous failure with failure caused by the update
  • Reduce the risk of unavailability during the process

Backup of Current Values

Export the current values ​​for each release to enable rollback in case of failure:

Terminal input
helm get values <RELEASE_NAME> -n <NAMESPACE> -o yaml > <RELEASE_NAME>-values-backup.yaml

Repeat this command for each release that will be updated.

Backup of Persistent Volumes

caution

Before any update, perform a backup of persistent data. In case of a severe failure, these backups will be required for recovery.

  1. Identify the component PVCs:

    Terminal input
    kubectl get pvc -n <NAMESPACE> -l app.kubernetes.io/instance=<RELEASE_NAME>
    Figure 4 - Get Pvc
    Figure 4 - Get Pvc
  2. Create snapshots of the persistent volumes (if the StorageClass supports it):

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

    Terminal input
    kubectl get volumesnapshot -n <NAMESPACE>

Update of CRDs

warning

CRDs must be updated before other components. These are global scope resources within the cluster and are not automatically managed by Helm during upgrade.

Update platform CRDs (tdp-crds) before any other components:

Terminal input
helm upgrade --install <RELEASE_NAME> \
oci://registry.tecnisys.com.br/tdp/charts/tdp-crds \
-n <NAMESPACE> --create-namespace
Example
Example
            helm upgrade --install tdp-crds \
oci://registry.tecnisys.com.br/tdp/charts/tdp-crds \
-n <NAMESPACE> --create-namespace
Figure 5 - Helm Upgrade tdp-crds
Figure 5 - Helm Upgrade tdp-crds

Wait for it to complete and check if the CRDs have been updated:

Terminal input
kubectl get crds | grep argoproj.io
Figure 6 - Check cdrs
Figure 6 - Check cdrs

Check history:

Terminal input
helm history <RELEASE_NAME> -n <NAMESPACE>
Example

Command used in the captures of this documentation:

Example
helm history demo-postgresql -n tdp-install-doc
Figure 7 - Check History
Figure 7 - Check History