Skip to main content
Version 3.0

Uninstall

This guide describes how to remove TDP Kubernetes components in an organized and safe way.

Before you start

Distinguish what is being removed:

  • components installed directly via Helm
  • Applications managed by ArgoCD
  • ArgoCD itself, when it is also part of the removal

This document clearly separates each scenario.

Attention

Removing Kubernetes resources does not automatically remove persisted data.
PVCs, PVs, snapshots and namespace must be evaluated separately.

Before performing any removal, identify how the component or environment was deployed.

1. Check if the component was installed via Helm

Use this command to discover existing Helm releases in the namespace:

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

If the component appears in this listing, the main removal is done with helm uninstall.

2. Check if the component is managed by ArgoCD

Use this command to discover Applications managed by ArgoCD:

Terminal input
argocd app list
Figure 2 - Applications managed by ArgoCD
Figure 2 - Applications managed by ArgoCD

If the component appears as an ArgoCD Application, the main removal is done with argocd app delete.

Rule of thumb

Do not mix flows unnecessarily.
If the component is managed by ArgoCD, the main path is to remove the Application.
If it was installed directly via Helm, the main path is to remove the Helm release.

Preparations before removal

Back up data

Before removing any stateful components, back up anything that needs to be preserved.

Common examples:

  • PostgreSQL: database dump
  • ClickHouse: export of tables and schemas
  • Airflow: DAGs, variables and connections
  • OpenMetadata: metadata and lineage
  • Ranger: relevant policies and settings

Export Helm release configuration

Once the component has been installed via Helm, export the currently applied values:

Terminal input
helm get values <RELEASE_NAME> -n <NAMESPACE> -o yaml > <RELEASE_NAME>-values-backup.yaml
Figure 3 - Exporting the Helm release configuration
Figure 3 - Exporting the Helm release configuration
Note

This file typically contains values overwritten during installation or upgrade.
To consult all parameters accepted by the chart, use helm show values on the corresponding chart.

To export the values ​​for all releases in the namespace at once:

Terminal input
for release in $(helm list -n <NAMESPACE> -q); do
helm get values "$release" -n <NAMESPACE> -o yaml > "${release}-values-backup.yaml"
echo "$release backup completed"
done

Identify associated PVCs

Before removing the component, verify that there are persistent volumes associated with it:

Terminal input
kubectl get pvc -n <NAMESPACE>
Figure 4 - PVCs associated with the release
Figure 4 - PVCs associated with the release

To restrict the query to a specific Helm release:

Terminal input
kubectl get pvc -n <NAMESPACE> -l app.kubernetes.io/instance=<RELEASE_NAME>

Create snapshot of persistent volumes, when supported

If the cluster supports CSI snapshots and there is VolumeSnapshotClass available, create snapshots of the critical PVCs before removal.

Check if the cluster supports snapshots:

Terminal input
kubectl get volumesnapshotclass

Create the snapshot:

Terminal input
kubectl apply -f - <<EOT
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
name: <pvc-name>-final-snapshot
namespace: <NAMESPACE>
spec:
volumeSnapshotClassName: <snapshot-class>
source:
persistentVolumeClaimName: <pvc-name>
EOT

Verify the result:

Terminal input
kubectl get volumesnapshot -n <NAMESPACE>

Evaluate CRDs before removing the platform

The tdp-crds chart installs cluster-scoped resources. These resources do not belong to a specific namespace and may remain after removing Helm releases or Argo CD Applications.

Before removing CRDs, confirm that all components that depend on them have already been removed and that no custom resources remain:

Terminal input
kubectl get crd

To evaluate remaining objects, check the types installed by the operators used in the platform, such as Argo CD, Strimzi, NiFiKop, Altinity ClickHouse Operator, OpenMetadata OMJob Operator and cert-manager.

caution

Remove CRDs only during full platform uninstallation or controlled administrative cleanup. Removing a CRD also removes the corresponding custom API and may affect resources that still exist in the cluster.

Remove components

Uninstall an individual component

Use this flow when the component was installed directly as a Helm release.

Uninstall the release

Terminal input
helm uninstall <RELEASE_NAME> -n <NAMESPACE>
Figure 5 - Uninstalling a component via Helm
Figure 5 - Uninstalling a component via Helm

Check if release features have been removed

Terminal input
kubectl get all -n <NAMESPACE> -l app.kubernetes.io/instance=<RELEASE_NAME>
Figure 6 - Release-managed resources after uninstallation
Figure 6 - Release-managed resources after uninstallation
note

This command shows what is still associated with the release after helm uninstall.
If the result is empty, the resources were removed successfully.

Check remaining PVCs

Terminal input
kubectl get pvc -n <NAMESPACE> -l app.kubernetes.io/instance=<RELEASE_NAME>
Figure 7 - Remaining PVCs
Figure 7 - Remaining PVCs
Note

helm uninstall removes the release and its associated Kubernetes resources — Deployments, StatefulSets, Services, ConfigMaps, and Secrets.
PVCs are normally not removed automatically.

Remove complete environment via Helm

Use this flow when the entire environment has been deployed directly via Helm, without Applications managed by ArgoCD.

Remove releases in reverse dependency order

Terminal input
helm uninstall tdp-superset -n <NAMESPACE>
helm uninstall tdp-openmetadata -n <NAMESPACE>
helm uninstall tdp-cloudbeaver -n <NAMESPACE>
helm uninstall tdp-jupyter -n <NAMESPACE>
helm uninstall tdp-airflow -n <NAMESPACE>
helm uninstall tdp-clickhouse -n <NAMESPACE>
helm uninstall tdp-trino -n <NAMESPACE>
helm uninstall tdp-spark -n <NAMESPACE>
helm uninstall tdp-nifi -n <NAMESPACE>
helm uninstall tdp-ranger -n <NAMESPACE>
helm uninstall tdp-iceberg -n <NAMESPACE>
helm uninstall tdp-deltalake -n <NAMESPACE>
helm uninstall tdp-ozone -n <NAMESPACE>
helm uninstall tdp-hive-metastore -n <NAMESPACE>
Kafka and Strimzi CRDs

Before uninstalling tdp-kafka, verify that there are no pending Strimzi resources in the namespace:

Terminal input
kubectl get kafkas,kafkatopics,kafkausers,kafkaconnects,kafkaconnectors -n <NAMESPACE>

Remove custom resources before uninstalling the chart to avoid orphaned CRDs in the cluster.

Terminal input
helm uninstall tdp-kafka -n <NAMESPACE>
helm uninstall tdp-postgresql -n <NAMESPACE>
helm uninstall tdp-argo -n <NAMESPACE>
helm uninstall tdp-crds -n <NAMESPACE>

Check remaining PVCs

Terminal input
kubectl get pvc -n <NAMESPACE>

Remove PVCs, if removal is permanent

Terminal input
kubectl delete pvc --all -n <NAMESPACE>
Figure 8 - Permanent removal of PVCs
Figure 8 - Permanent removal of PVCs
Data loss

Deleting PVCs permanently removes persisted data.
Do this only when disassembly is final and backups are complete.

Limpeza complementar

Check Persistent Orphan Volumes

After removing the PVCs, check if there are PVs in the Released state:

Terminal input
kubectl get pv | grep <NAMESPACE>
Figure 13 - Verification of Persistent Orphan Volumes
Figure 13 - Verification of Persistent Orphan Volumes

If there are orphaned PVs and you no longer need them:

Terminal input
kubectl delete pv <pv-name>
Figure 14 - Delete PVs
Figure 14 - Delete PVs

Remove namespace, when applicable

Only remove the namespace when it is dedicated exclusively to the environment being dismounted.

Terminal input
kubectl delete namespace <NAMESPACE>
Attention

Removing the namespace deletes all namespaced resources still in it, including PVCs, ConfigMaps, Secrets, and ServiceAccounts.

If the namespace gets stuck in Terminating, check finalizers:

Terminal input
kubectl get namespace <NAMESPACE> -o json | jq '.spec.finalizers'

To force termination:

Terminal input
kubectl get namespace <NAMESPACE> -o json | jq '.spec.finalizers = []' | \
kubectl replace --raw "/api/v1/namespaces/<NAMESPACE>/finalize" -f -

Final check

After removal, check whether there is anything left in the environment.

Check remaining resources in the namespace

Terminal input
kubectl get all -n <NAMESPACE>

Check remaining Helm releases

Terminal input
helm list -n <NAMESPACE>

Check remaining Applications in ArgoCD

Terminal input
argocd app list

Check remaining PVCs

Terminal input
kubectl get pvc -n <NAMESPACE>

Check remaining PVs

Terminal input
kubectl get pv | grep <NAMESPACE>

Resumo

SituationMain pathNote
Component installed directly via Helmhelm uninstall <RELEASE_NAME> -n <NAMESPACE>Use when there is actual Helm release
Component managed by ArgoCDargocd app delete <component> --cascadeRemoves the Application and managed resources
Complete removal from ArgoCD managed environmentargocd app delete ... --cascade in reverse order, or root app removalPVCs and PVs may require manual cleaning
Removal of ArgoCD itselfhelm uninstall tdp-argo -n <NAMESPACE>It must occur after removing the Applications
Complete removal of the installed environment via Helmsequence of helm uninstall in reverse orderSeparate flow from ArgoCD model
Persistent data cleaningkubectl delete pvc... and, if necessary, kubectl delete pv...Manual and destructive step
Namespace cleanupkubectl delete namespace <NAMESPACE>Only when the namespace is dedicated to the removed environment