Remove without losing
what needs to stay.
How to take a component, or the whole platform, out of a cluster: what to save first, the right path for each installation method, what each chart leaves behind on purpose, and the final cleanup of volumes, CRDs, and namespace.
Uninstalling means removing the Helm release or the Application of each component, in the reverse order of the installation. What stays afterwards varies by chart: some keep PVCs and Secrets on purpose, others delete the volumes together with the release, such as the Airflow DAGs volume and the CloudBeaver workspace. PVs, snapshots, CRDs, and namespace are separate decisions, made after the backups.
Your environment
If you fill in your environment details here, examples and commands on the page use what you entered. The Helm release name and the Argo CD Application name are those of the component you are removing now.
Some charts keep PVCs and Secrets on purpose. Others delete the volumes with the release, such as the Airflow DAGs volume and the CloudBeaver workspace. Take the backups first. Scenario 2 shows what each chart keeps. PVs, snapshots, and namespace are evaluated separately, in each scenario. Before any removal, identify how the component was deployed: a Helm release comes out with helm uninstall. An Argo CD Application comes out through the Git repository (kit) or with argocd app delete. Do not mix the flows unnecessarily.
Scenarios
- 1 · Prepare
- 2 · Remove via Helm
- 3 · Remove via Argo CD
- 4 · Remove the whole platform
- 5 · Final cleanup and verification
Identify how it was installed, back up, export values, map volumes and CRDs.
You are going to remove a component, or the whole environment, and do not yet know for sure how it was installed or what needs to be preserved. This stage answers both questions: the removal path depends on the installation method, and everything that has state (database, tables, DAGs, metadata, policies) needs a copy first.
Appears in helm list. Comes out with helm uninstall: scenario 2.
Appears in argocd app list. Installed by the GitOps kit, it comes out through the repository. Standalone, with argocd app delete: scenario 3.
Cluster-scoped resources, installed by tdp-crds. They keep existing after the releases and Applications. They only go out in a complete uninstallation.
Identify how the component was installed
Know whether the main removal is helm uninstall or through Argo CD.
helm list -n <NAMESPACE>
argocd app list
It worked when
$ helm list -n tdp
NAME NAMESPACE REVISION UPDATED STATUS CHART
tdp-postgresql tdp 1 2026-03-25 07:55:41.058865 -0300 -03 deployed tdp-postgresql-…Back up the data
A copy of everything that has state and needs to be preserved.
Before removing, make a copy of the data you want to preserve. Some charts delete volumes together with the release, such as the Airflow DAGs volume and the CloudBeaver workspace: scenario 2 shows what each chart keeps. The volumes step, below, creates the snapshots.
Export the Helm release values
The values file of each release, for a future reinstallation.
# One release
helm get values <RELEASE_NAME> -n <NAMESPACE> -o yaml > <RELEASE_NAME>-values-backup.yaml
# All releases in the namespace
for release in $(helm list -n <NAMESPACE> -q); do
helm get values "$release" -n <NAMESPACE> -o yaml > "${release}-values-backup.yaml"
echo "Backup de $release concluído"
done
This file contains the values overridden during the installation or update. To check all the parameters the chart accepts, use helm show values on the corresponding chart. In an installation through the GitOps kit, the values are already versioned in current/.
It worked when
$ helm get values tdp-postgresql -n tdp -o yaml
primary:
persistence:
size: 2Gi
resources:
limits:
cpu: 1200m
memory: 2Gi
requests:
cpu: 600m
memory: 1GiMap the volumes and create snapshots
Know which PVCs exist and have a snapshot of the critical ones, when the StorageClass supports it.
# Namespace PVCs, or only those of one release
kubectl get pvc -n <NAMESPACE>
kubectl get pvc -n <NAMESPACE> -l app.kubernetes.io/instance=<RELEASE_NAME>
# Does the cluster support snapshots?
kubectl get volumesnapshotclass
# One snapshot per critical PVC
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
kubectl get volumesnapshot -n <NAMESPACE>
It worked when
READYTOUSE equal to true.$ kubectl get pvc -n tdp
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS …
data-tdp-postgresql-0 Bound pvc-96e86693-898e-48e0-b09f-0d1498bb17f8 1Gi RWO local-path …
data-tdp-postgresql-v2-0 Bound pvc-19ab24d6-1327-46f4-823b-567e865354f1 1Gi RWO local-path …Evaluate the CRDs, if the removal is of the whole platformOpcional
Know which custom resources still exist before thinking about removing CRDs.
kubectl get crd
The types installed by tdp-crds are those of the platform operators: Argo CD, Strimzi, NiFiKop, Altinity ClickHouse Operator, OpenMetadata (OMJob Operator), cert-manager, and licensing (PlatformLicense and LicensePolicy). Before removing a CRD, confirm that all the components that depend on it have already been removed and that there are no custom resources left.
Remove CRDs only in a complete platform uninstallation or in a controlled administrative cleanup. Removing a CRD also removes the corresponding custom API and can affect resources that still exist in the cluster.
helm uninstall, what it removes, and what each chart keeps on purpose.
The component was installed directly as a Helm release and you are going to remove it. helm uninstall removes the release and its Kubernetes resources: Deployments, StatefulSets, Services, ConfigMaps, and Secrets, and also the PVCs that the chart creates directly. The PVCs created by the StatefulSet volumeClaimTemplates remain, and some charts keep data and Secrets on purpose, so that a new installation in the same namespace reuses them.
The release and the resources labeled with it. The PVCs that the chart creates directly.
PVCs from volumeClaimTemplates; the data and Secrets that each chart preserves on purpose (list below); the CRDs.
Uninstall the release
The release and its resources out of the cluster.
helm uninstall <RELEASE_NAME> -n <NAMESPACE>
It worked when
$ helm uninstall tdp-postgresql -n tdp
release "tdp-postgresql-v2" uninstalledCheck what is left of the release
Nothing else associated with the release, except what is kept on purpose.
kubectl get all -n <NAMESPACE> -l app.kubernetes.io/instance=<RELEASE_NAME>
kubectl get pvc -n <NAMESPACE> -l app.kubernetes.io/instance=<RELEASE_NAME>
It worked when
$ kubectl get all -n tdp -l app.kubernetes.io/instance=tdp-postgresql
No resources found in tdp namespace.Delete what the chart keeps, if the removal is finalOpcional
Start from scratch on a next installation, without old data or passwords.
A new installation in the same namespace reuses these resources. To start from scratch, delete them after the uninstall.
tdp-postgresql
The chart keeps the data PVC and the Secret tdp-postgresql-auth. A new installation in the same namespace reuses both, and the old data and password come back. The PVC is named data-<POSTGRESQL_SERVICE>-0, where <POSTGRESQL_SERVICE> is <RELEASE_NAME>-tdp-postgresql, or just <RELEASE_NAME> when the release name already contains the chart name. Details in PostgreSQL Configuration.
kubectl delete pvc data-<POSTGRESQL_SERVICE>-0 -n <NAMESPACE>
kubectl delete secret tdp-postgresql-auth -n <NAMESPACE>
tdp-openmetadata
The chart keeps the data PVCs of the embedded MySQL and OpenSearch, and a new installation in the same namespace finds the metadata and the search data again. It also keeps the Secrets with the database user password, as well as the database itself: with the embedded MySQL, mysql-secrets and <RELEASE_NAME>-mysql-secrets. With PostgreSQL, <RELEASE_NAME>-postgresql-secrets (or the name set in global.TDP-Settings.database.postgresql.database.secretName). Delete the MySQL Secrets only together with the PVCs: a new installation with the old volume and new Secrets does not get into the database (Access denied for user 'openmetadata_user'). Details in OpenMetadata Configuration.
kubectl -n <NAMESPACE> get pvc -l app.kubernetes.io/instance=<RELEASE_NAME>
kubectl -n <NAMESPACE> delete pvc -l app.kubernetes.io/instance=<RELEASE_NAME>
kubectl -n <NAMESPACE> delete secret mysql-secrets <RELEASE_NAME>-mysql-secrets
tdp-airflow
The chart keeps the embedded PostgreSQL volume (data-<RELEASE_NAME>-postgresql-0) and the triggerer logs volume (logs-<RELEASE_NAME>-triggerer-0). A new installation in the same namespace finds the old database again. It also keeps the three Secrets with the Airflow internal keys, <RELEASE_NAME>-api-secret-key, <RELEASE_NAME>-jwt-secret, and <RELEASE_NAME>-webserver-secret-key, which a new installation in the same namespace reuses.
kubectl -n <NAMESPACE> delete pvc data-<RELEASE_NAME>-postgresql-0 logs-<RELEASE_NAME>-triggerer-0
kubectl -n <NAMESPACE> delete secret <RELEASE_NAME>-api-secret-key <RELEASE_NAME>-jwt-secret <RELEASE_NAME>-webserver-secret-key
The DAGs PVC, <RELEASE_NAME>-dags, does not stay: the uninstall deletes it along with the DAGs, unless the volume is a PVC created by you and set in tdp-airflow.dags.persistence.existingClaim. Details in Airflow Configuration.
tdp-superset
The chart keeps the embedded PostgreSQL volume (data-<RELEASE_NAME>-postgresql-0), and a new installation in the same namespace finds the old database and passwords again. Details in Superset Configuration.
kubectl -n <NAMESPACE> delete pvc data-<RELEASE_NAME>-postgresql-0
tdp-nifi
The chart keeps the ZooKeeper volume (data-<RELEASE_NAME>-zookeeper-0).
kubectl -n <NAMESPACE> delete pvc data-<RELEASE_NAME>-zookeeper-0
The NiFi data PVCs use, by default, reclaimPolicy: Delete. To avoid losing data on an uninstall, set reclaimPolicy: Retain on the data PVCs (flowfile, content, and provenance repository). Details in NiFi Configuration.
tdp-kafka
The chart keeps the broker disks (nodePool.storage.volumes.deleteClaim: false), and a new installation with the same cluster name finds the old data again. <KAFKA_CLUSTER_NAME> is the value of name. Details in Kafka Configuration.
kubectl -n <NAMESPACE> delete pvc -l strimzi.io/cluster=<KAFKA_CLUSTER_NAME>
tdp-clickhouse
The chart keeps the data volumes (with reclaimPolicy: Retain), and a new installation with the same release name finds the old databases again. With the release named as in the recommended installation, the data PVC is <RELEASE_NAME>-data-chi-<RELEASE_NAME>-<RELEASE_NAME>-0-0-0, one per ClickHouse pod. Details in ClickHouse Configuration.
kubectl -n <NAMESPACE> get pvc
kubectl -n <NAMESPACE> delete pvc <RELEASE_NAME>-data-chi-<RELEASE_NAME>-<RELEASE_NAME>-0-0-0
tdp-jupyter
The uninstall stops the notebook servers but keeps the users volumes: one PVC per user, claim-<user>, created by JupyterHub on the first login and outside Helm. A new installation in the same namespace finds them again. Deleting them removes the notebooks and files of all the users. Details in JupyterLab Configuration.
kubectl -n <NAMESPACE> get pvc -l component=singleuser-storage,app.kubernetes.io/instance=<RELEASE_NAME>
kubectl -n <NAMESPACE> delete pvc -l component=singleuser-storage,app.kubernetes.io/instance=<RELEASE_NAME>
tdp-ozone
The chart keeps the data volumes, and a new installation with the same name in the same namespace finds the old data: <RELEASE_NAME>-om-<RELEASE_NAME>-om-0, <RELEASE_NAME>-scm-<RELEASE_NAME>-scm-0, <RELEASE_NAME>-s3g-<RELEASE_NAME>-s3g-0, <RELEASE_NAME>-datanode-<RELEASE_NAME>-datanode-<n>, and, with Kerberos, <RELEASE_NAME>-kdc. With Kerberos, the keytab Secrets also stay. Details in Apache Ozone Configuration.
kubectl -n <NAMESPACE> get pvc
kubectl -n <NAMESPACE> delete pvc <PVC_NAME>
kubectl -n <NAMESPACE> delete secret <RELEASE_NAME>-om-keytab <RELEASE_NAME>-scm-keytab \
<RELEASE_NAME>-dn-keytab <RELEASE_NAME>-s3g-keytab <RELEASE_NAME>-recon-keytab --ignore-not-found
tdp-cloudbeaver
The workspace (users, connections, settings, and, without an external database, the CloudBeaver own metadata) lives in the PVC named after the release, <RELEASE_NAME>, and helm uninstall deletes it. Back up first, for example with a VolumeSnapshot (scenario 1). Details in CloudBeaver Configuration.
tdp-hive-metastore
After helm uninstall, a post-delete Job removes the Secret <RELEASE_NAME>-hive-database and the ServiceAccount, Role, and RoleBinding used by the database Jobs. Details in Hive Metastore Configuration.
tdp-ranger
After the removal, a chart Job deletes the Ranger ServiceAccount, Role, and RoleBindings, including the anyuid SCC one, and the Secret <RELEASE_NAME>-ranger-database of the external database. The Secrets you created with kubectl, such as tdp-registry, are not part of the release and stay in the namespace. Details in Ranger Configuration.
tdp-argo
A post-removal Job deletes the ServiceAccounts, Secrets, Roles, RoleBindings, ClusterRoles, and ClusterRoleBindings with the release label (app.kubernetes.io/instance=<RELEASE_NAME>). The resources that Argo CD creates at runtime, such as the Secret argocd-initial-admin-secret, do not have this label: delete them by name or remove the namespace. The Argo CD CRDs belong to tdp-crds and are kept.
Deleting PVCs permanently removes the persisted data. Do it only when the teardown is final and the backups are already complete.
Through the repository, with the GitOps kit, or with argocd app delete on a standalone Application.
The component is an Argo CD Application. If it was created by the GitOps kit, a root Application with selfHeal declares it from current/: removing the Application directly does not solve it, because the root recreates it. The native path is to delete the component directory from the repository and publish. Argo CD prunes the Application and runs its cleanup hooks. argocd app delete is for standalone Applications, with no root declaring them.
rm -rf current/<APPLICATION_NAME>/, commit, and push. Automated sync with prune removes the Application and runs the cleanup hooks.
argocd app delete --cascade removes the Application and the resources it manages. PVCs, PVs, and other leftovers still require checking.
Remove through the repository (component installed by the kit)
The Application out of current/, removed by Argo CD.
rm -rf current/<APPLICATION_NAME>/
git add current/
git commit -m "chore: remove <APPLICATION_NAME>"
git push origin main
For the complete kit lifecycle (rendering components, customizing the values files, and updating the chart version), see Installation via Argo CD and Update via Argo CD.
Remove the Application (standalone component, no root)Opcional
The Application and its resources out of the cluster.
argocd app delete <APPLICATION_NAME> --cascade
It worked when
$ argocd app delete tdp-postgresql --cascade
application 'tdp-postgresql-v2' deletedIf the Application comes back right after
It is declared by a root Application with selfHeal, like the one in the TDP GitOps kit. Remove it through the repository, as in the previous step.
Check the removal
The Application out of the list and none of its resources in the namespace.
argocd app list
kubectl get all -n <NAMESPACE>
kubectl get pvc -n <NAMESPACE>
It worked when
$ argocd app list
NAME CLUSTER NAMESPACE PROJECT STATUS HEALTH SYNCPOLICY CONDITIONS REPO
argocd/tdp-postgresql https://kubernetes.default.svc tdp default Synced Healthy Auto-Prune <none> registry.tecnisys.com.br/tdp/charts …
argocd/tdp-stack https://kubernetes.default.svc argocd default Synced Healthy Auto-Prune <none> https://git.example.com/tdp-gitops.git …
$ kubectl get all -n tdp
No resources found in tdp namespace.Components in reverse order, then Argo CD, operators, and license. The CRDs last.
The entire TDP environment is going out of the cluster. The order is the reverse of the installation: first the components, from the last installed to the first. Then Argo CD, if it is part of the removal, the operators, and the license. Next come the resources created outside Helm, PlatformLicense, LicensePolicy, and the Argo CD AppProjects, and only then, if the cleanup is final, the cleanup Job removes the CRDs: it skips every CRD that still has resources.
The order for removing the platform
How was the platform installed?
- Releases. helm uninstall in the reverse order of the installation. (
helm uninstall <RELEASE_NAME> -n <NAMESPACE>) - Data. What stays varies by chart: some keep PVCs and Secrets on purpose, others delete the volumes with the release. What stays is removed by hand, if the removal is final: scenario 2. (
kubectl delete pvc -n <NAMESPACE> -l app.kubernetes.io/instance=<RELEASE_NAME>) - Argo CD. Removed via Helm, in the ARGOCD_NAMESPACE namespace, only after all the Applications. With the GitOps kit, the release is named after the chart. A post-removal Job deletes the resources labeled with the release. The runtime ones stay. (
helm uninstall tdp-argocd -n <ARGOCD_NAMESPACE>) - Operators. Outside GitOps on both paths. Removed via Helm after Kafka and ClickHouse. (
helm uninstall tdp-operator -n tdp-system) - License. Removed via Helm after the components, Argo CD, and the operators. (
helm uninstall tdp-license -n tdp-system) - Resources created outside Helm. PlatformLicense and LicensePolicy, which the license helm uninstall keeps, and the Argo CD AppProjects. Deleted before the CRDs. (
kubectl delete platformlicenses,licensepolicies -A --all) - CRDs. helm uninstall does not delete the CRDs. To remove them, the chart brings a cleanup Job, which skips CRDs with resources in use. (
kubectl apply -f tdp-crds/cleanup/delete-crds-job.yaml) - Namespace. Deleting the namespace removes everything left in it: PVCs, ConfigMaps, Secrets, and ServiceAccounts. (
kubectl delete namespace <NAMESPACE>)
How was the platform installed?: Via Helm
- Releases. helm uninstall in the reverse order of the installation. (
helm uninstall <RELEASE_NAME> -n <NAMESPACE>) - Data. What stays varies by chart: some keep PVCs and Secrets on purpose, others delete the volumes with the release. What stays is removed by hand, if the removal is final: scenario 2. (
kubectl delete pvc -n <NAMESPACE> -l app.kubernetes.io/instance=<RELEASE_NAME>) - Argo CD. Removed via Helm, in the ARGOCD_NAMESPACE namespace, only after all the Applications. With the GitOps kit, the release is named after the chart. A post-removal Job deletes the resources labeled with the release. The runtime ones stay. (
helm uninstall tdp-argocd -n <ARGOCD_NAMESPACE>) - Operators. Outside GitOps on both paths. Removed via Helm after Kafka and ClickHouse. (
helm uninstall tdp-operator -n tdp-system) - License. Removed via Helm after the components, Argo CD, and the operators. (
helm uninstall tdp-license -n tdp-system) - Resources created outside Helm. PlatformLicense and LicensePolicy, which the license helm uninstall keeps, and the Argo CD AppProjects. Deleted before the CRDs. (
kubectl delete platformlicenses,licensepolicies -A --all) - CRDs. helm uninstall does not delete the CRDs. To remove them, the chart brings a cleanup Job, which skips CRDs with resources in use. (
kubectl apply -f tdp-crds/cleanup/delete-crds-job.yaml) - Namespace. Deleting the namespace removes everything left in it: PVCs, ConfigMaps, Secrets, and ServiceAccounts. (
kubectl delete namespace <NAMESPACE>)
How was the platform installed?: Via Argo CD (GitOps kit)
- Applications. Delete current/<APPLICATION_NAME>/ and publish: Argo CD prunes each Application and runs its cleanup hooks. (
rm -rf current/<APPLICATION_NAME>/ && git push) - Data. What stays varies by chart: some keep PVCs and Secrets on purpose, others delete the volumes with the release. What stays is removed by hand, if the removal is final: scenario 2. (
kubectl delete pvc -n <NAMESPACE> -l app.kubernetes.io/instance=<RELEASE_NAME>) - Argo CD. Removed via Helm, in the ARGOCD_NAMESPACE namespace, only after all the Applications. With the GitOps kit, the release is named after the chart. A post-removal Job deletes the resources labeled with the release. The runtime ones stay. (
helm uninstall tdp-argocd -n <ARGOCD_NAMESPACE>) - Operators. Outside GitOps on both paths. Removed via Helm after Kafka and ClickHouse. (
helm uninstall tdp-operator -n tdp-system) - License. Removed via Helm after the components, Argo CD, and the operators. (
helm uninstall tdp-license -n tdp-system) - Resources created outside Helm. PlatformLicense and LicensePolicy, which the license helm uninstall keeps, and the Argo CD AppProjects. Deleted before the CRDs. (
kubectl delete platformlicenses,licensepolicies -A --all) - CRDs. helm uninstall does not delete the CRDs. To remove them, the chart brings a cleanup Job, which skips CRDs with resources in use. (
kubectl apply -f tdp-crds/cleanup/delete-crds-job.yaml) - Namespace. Deleting the namespace removes everything left in it: PVCs, ConfigMaps, Secrets, and ServiceAccounts. (
kubectl delete namespace <NAMESPACE>)
Remove the components in the reverse order of the installation
All the components out of the cluster, from the last installed to the first.
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-nifi -n <NAMESPACE>
helm uninstall tdp-kafka -n <NAMESPACE>
helm uninstall tdp-ranger -n <NAMESPACE>
helm uninstall tdp-deltalake -n <NAMESPACE>
helm uninstall tdp-superset -n <NAMESPACE>
helm uninstall tdp-clickhouse -n <NAMESPACE>
helm uninstall tdp-trino -n <NAMESPACE>
helm uninstall tdp-iceberg -n <NAMESPACE>
helm uninstall tdp-spark -n <NAMESPACE>
helm uninstall tdp-hive-metastore -n <NAMESPACE>
helm uninstall tdp-ozone -n <NAMESPACE>
helm uninstall tdp-postgresql -n <NAMESPACE>
The names above follow the convention of a release equal to the chart name. Replace them with yours. PostgreSQL keeps the data PVC and the Secret tdp-postgresql-auth after the uninstall: see what each chart keeps.
With the GitOps kit, remove the component directories from the repository and publish: Argo CD removes each Application with its cleanup hooks.
rm -rf current/tdp-*/
git add current/
git commit -m "chore: remove all TDP components"
git push origin main
Without a root Application, remove the Applications one by one, in the reverse order of the installation:
argocd app delete tdp-openmetadata --cascade
argocd app delete tdp-cloudbeaver --cascade
argocd app delete tdp-jupyter --cascade
argocd app delete tdp-airflow --cascade
argocd app delete tdp-nifi --cascade
argocd app delete tdp-kafka --cascade
argocd app delete tdp-ranger --cascade
argocd app delete tdp-deltalake --cascade
argocd app delete tdp-superset --cascade
argocd app delete tdp-clickhouse --cascade
argocd app delete tdp-trino --cascade
argocd app delete tdp-iceberg --cascade
argocd app delete tdp-spark --cascade
argocd app delete tdp-hive-metastore --cascade
argocd app delete tdp-ozone --cascade
argocd app delete tdp-postgresql --cascade
It worked when
helm list -n <NAMESPACE>
argocd app list
kubectl get all -n <NAMESPACE>
kubectl get pvc -n <NAMESPACE>
Remove Argo CD, if it is part of the removalOpcional
The Argo CD release out of the cluster, after all the Applications.
Argo CD is removed via Helm, regardless of how the TDP environment was managed. In the GitOps kit, deploy.sh installs it in the namespace defined in ARGOCD_NAMESPACE. In a direct installation via Helm, use the namespace chosen at installation.
On standard Kubernetes, the TDP Argo CD is a Helm release: remove it with the command below.
On OpenShift, Red Hat OpenShift GitOps and tdp-argo do not coexist in the same cluster. If the cluster uses OpenShift GitOps, Argo CD is not a TDP release and this step does not apply. If it uses tdp-argo, remove the release with the command below.
In the direct installation via Helm, the release is named tdp-argocd. With the GitOps kit, deploy.sh names the release after the chart, tdp-argo:
# Direct installation via Helm
helm uninstall tdp-argocd -n <ARGOCD_NAMESPACE>
# Installation through the GitOps kit
helm uninstall tdp-argo -n <ARGOCD_NAMESPACE>
A post-removal Job deletes the resources labeled with the release. The runtime resources, such as the Secret argocd-initial-admin-secret, stay: delete them by name or remove the namespace.
Remove the operators
tdp-operator out of the cluster, after Kafka and ClickHouse.
helm uninstall tdp-operator -n tdp-system
Remove the license
The license release out of the cluster, after the components, Argo CD, and the operators.
The license goes out after all the components. The release is in the namespace of the GitOps kit TDP_LICENSE_NAMESPACE, tdp-system by default.
helm uninstall tdp-license -n tdp-system
Delete the resources created outside Helm
No PlatformLicense, LicensePolicy, or AppProject in the cluster.
deploy.sh creates the PlatformLicense and LicensePolicy resources outside Helm, and the license helm uninstall keeps them. Argo CD creates the default AppProject, and the GitOps kit applies the TDP AppProject with kubectl. Delete them before the CRDs:
kubectl delete platformlicenses,licensepolicies -A --all
kubectl delete appprojects.argoproj.io -A --all
It worked when
kubectl get platformlicenses,licensepolicies,appprojects.argoproj.io -A
Remove the CRDs with the cleanup JobOpcional
CRDs with no resources in use out of the cluster.
The tdp-crds helm uninstall removes the release, but not the CRDs:
helm uninstall tdp-crds -n tdp-system
tdp-crds registers the CRDs of several components (Argo CD, Kafka, NiFiKop, ClickHouse, OpenMetadata, cert-manager, and licensing): evaluate carefully before removing them.
To remove the CRDs, the chart brings a cleanup Job. The manifest comes inside the chart package: extract the package and apply the file. The Job checks whether dependent resources exist before deleting each CRD. CRDs with resources in use are skipped, which is why the previous steps come first. The manifest creates the Job tdp-crds-cleanup and the supporting resources in the tdp-system namespace.
helm pull oci://registry.tecnisys.com.br/tdp/charts/tdp-crds --version 3.0.3 --untar
kubectl apply -f tdp-crds/cleanup/delete-crds-job.yaml
kubectl -n tdp-system logs -f job/tdp-crds-cleanup
# When the Job finishes: remove the Job and its RBAC (the ClusterRole can delete any CRD)
kubectl delete -f tdp-crds/cleanup/delete-crds-job.yaml
It worked when
kubectl get crd no longer lists the types of the platform operators, and the Job and its RBAC were removed.PVCs, orphan PVs, a namespace stuck in Terminating, and checking what is left.
The releases or Applications are already gone and you want to leave the cluster clean: delete the data that will no longer be used, free the volumes, remove the namespace if it was dedicated to the environment, and check that nothing was left behind.
Remove the PVCs, if the removal is final
No environment volume in the namespace.
kubectl get pvc -n <NAMESPACE>
kubectl delete pvc -n <NAMESPACE> -l app.kubernetes.io/instance=<RELEASE_NAME>
kubectl delete pvc <PVC_NAME> -n <NAMESPACE>
Deleting PVCs permanently removes the persisted data. Do it only when the teardown is final and the backups are already complete.
It worked when
$ kubectl delete pvc data-tdp-postgresql-v2-0 -n tdp
persistentvolumeclaim "data-tdp-postgresql-v2-0" deletedCheck for orphan Persistent Volumes
No PV in Released pointing to the namespace.
kubectl get pv | grep <NAMESPACE>
kubectl delete pv <PV_NAME>
It worked when
Released. The lines in Bound belong to PVCs that still exist and go away with them.$ kubectl get pv | grep tdp
pvc-7893b861-6200-4d41-8029-043ec57eff35 1Gi RWO Delete Bound tdp/data-tdp-postgresql-0 local-path <unset> 5d21hRemove the namespace, when applicableOpcional
The namespace out of the cluster, with everything that was left in it.
Remove the namespace only when it is dedicated exclusively to the environment being dismantled. The removal deletes all the namespaced resources still in it, including PVCs, ConfigMaps, Secrets, and ServiceAccounts.
kubectl delete namespace <NAMESPACE>
Final verification
Nothing from the environment is left in the cluster.
kubectl get all -n <NAMESPACE>
helm list -n <NAMESPACE>
argocd app list
kubectl get pvc -n <NAMESPACE>
kubectl get pv | grep <NAMESPACE>
It worked when
Troubleshooting
Paste the message or choose the symptom.
- Namespace stuck in Terminating. Cause: A resource in the namespace has a finalizer that no one processes anymore, for example from an operator that was already removed. What to do: Look at the namespace finalizers. Only force the finalization when the controller responsible for the finalizer no longer exists: the command below skips the cleanup it would have done.
- Removed Application comes back on its own. Cause: A root Application with selfHeal, like the one in the GitOps kit, keeps declaring the component from current/. What to do: Remove the component through the repository: delete current/<APPLICATION_NAME>/ and publish.
- PVC remains after helm uninstall. Cause: PVCs created by StatefulSet volumeClaimTemplates do not belong to the release. And some charts keep data and Secrets on purpose. What to do: Delete them by hand, if the removal is final: see what each chart keeps, in scenario 2.
- PV in Released after deleting the PVC. Cause: The volume retention policy is Retain: the PV is not deleted with the PVC. What to do: If the data is no longer needed, delete the PV.
- Cleanup Job did not remove a CRD. Cause: The Job skips CRDs that still have resources in use. What to do: Remove the remaining custom resources (for example Kafka, KafkaTopic, ClickHouseInstallation, Application, PlatformLicense, LicensePolicy, AppProject) and run the Job again.
- Argo CD Secrets stayed after the uninstall. Cause: Resources created by Argo CD at runtime do not have the release label and the post-removal Job does not delete them. What to do: Delete them by name or remove the Argo CD namespace, if it was dedicated.
Summary
| Situation | Main path | Note |
|---|---|---|
| Component installed directly via Helm | helm uninstall <RELEASE_NAME> -n <NAMESPACE> | Use when there is a real Helm release |
| Component installed by the GitOps kit | delete current/<APPLICATION_NAME>/ and git push | Argo CD prunes the Application and runs the cleanup hooks |
| Standalone Argo CD Application | argocd app delete <APPLICATION_NAME> --cascade | Removes the Application and the managed resources |
| Whole platform via Helm | sequence of helm uninstall in the reverse order of the installation | Then: tdp-argo, tdp-operator, tdp-license, the resources created outside Helm and, last, the CRDs |
| Whole platform via Argo CD | delete current/tdp-*/ and git push | PVCs and PVs may require manual cleanup |
| License removal | helm uninstall tdp-license -n tdp-system and kubectl delete platformlicenses,licensepolicies -A --all | After the components, Argo CD, and the operators |
| Removal of Argo CD itself | helm uninstall tdp-argocd -n <ARGOCD_NAMESPACE> | After the Applications are removed; with the GitOps kit, the release is named after the chart, tdp-argo |
| Persistent data cleanup | kubectl delete pvc … and, if necessary, kubectl delete pv … | Manual and destructive step |
| Namespace cleanup | kubectl delete namespace <NAMESPACE> | Only when the namespace is dedicated to the removed environment |