Uninstall
Scripts for removing the praxis-collector supervisor from a Kubernetes cluster.
Uninstallation
sudo bash -c "$(curl -k -L https://storage.googleapis.com/download_dev/k8s_uninstall.sh)" -- -n praxis-collector
The -k flag disables TLS certificate verification for the script download. If your environment requires verified downloads, fetch the script separately, inspect it, and run it directly instead of piping to bash.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
namespace / -n | string | praxis-collector | The namespace to uninstall from. Must match the namespace used during installation. All namespace-scoped resources (Deployment, ConfigMap, ServiceAccount, child collectors) are removed from this namespace. The namespace itself is deleted at the end. |
What the Script Does
The script shows you what will be removed and prompts for confirmation before touching anything. Once confirmed, it removes resources in this order:
- Child Collectors — deletes all
OpenTelemetryCollectorCRs in the namespace labelledapp.kubernetes.io/managed-by=praxis-collector. Waits for full deletion before continuing, which causes the OTel Operator to tear down all child collector Deployments, DaemonSets, and StatefulSets. - Node-level host path cleanup — log-tailing DaemonSets persist file read-offset checkpoints to host paths on every node they ran on. The script deploys a short-lived cleanup DaemonSet that mounts
/var/libon each node and removes the offset directories. It waits up to 120 seconds for the cleanup to complete on all nodes. Two host paths exist depending on which install path was used:/var/lib/praxis-edge-collector/<pipeline>/— written by every cloud-emitted log-tailing CR (the file_storage hostPath comes from the cloud-side packaging inadaptive-pipeline). Keyed on pipeline name so it's stable across split↔merged-DaemonSet migrations./var/lib/praxis-collector/file_storage/— written when the supervisor'schildCollector.fileStorage.enabled=trueHelm option auto-injects a hostPath into a child CR.
- Supervisor Deployment — removes the supervisor Deployment. The pod begins terminating and is removed after its grace period.
- ConfigMap — removes the supervisor configuration ConfigMap (
praxis-collector-configby default). - ServiceAccount — removes the ServiceAccount the supervisor ran as.
- ClusterRoleBinding and ClusterRole — removes all cluster-scoped RBAC resources labelled
app.kubernetes.io/name=praxis-collector. Also explicitly checks for and removespraxis-collector-k8s-receiverby name, covering installations where the optional k8s receiver RBAC was applied without the label. - Namespace — deletes the entire namespace. Kubernetes garbage-collects any remaining resources inside it, including the cleanup DaemonSet.
The current uninstall script only removes /var/lib/praxis-collector/ from nodes; it does not clean /var/lib/praxis-edge-collector/ (the path actually used for cloud-emitted log-tailing CRs). If you need a fully clean slate, run a one-shot DaemonSet to remove that directory after uninstall, or remove it manually on each node.
All deletions use --ignore-not-found=true. The script does not fail if a resource was already removed or was never created.
If any node times out during the host path cleanup step, a warning is printed and the path must be removed manually from those nodes.
Verifying the Uninstallation
# Namespace should be gone
kubectl get namespace praxis-collector
# No cluster-scoped RBAC should remain with the app label
kubectl get clusterrole -l app.kubernetes.io/name=praxis-collector
kubectl get clusterrolebinding -l app.kubernetes.io/name=praxis-collector
# No supervisor pods should be present
kubectl get pods -n praxis-collector -l app.kubernetes.io/component=supervisor
# No child collectors should remain
kubectl get opentelemetrycollectors -n praxis-collector
All of the above should return NotFound or an empty list after a successful uninstall.
What Remains After Uninstall
The uninstall script removes only resources created by this installer. The following are intentionally left in place:
| Resource | Reason |
|---|---|
| cert-manager | Installed and managed independently. May be used by other workloads in your cluster. Remove it separately if no longer needed. |
| OpenTelemetry Operator | Installed and managed independently. May manage other OpenTelemetryCollector resources in different namespaces. Remove it separately using its own Helm chart. |
Prometheus CRDs (ServiceMonitor, PodMonitor) | Installed independently (typically by the Prometheus Operator or kube-prometheus-stack). Not touched by this installer or uninstaller. |
| Supervisor metadata PVC | Created only by the Helm chart when supervisor.persistence.enabled=true (name: <release>-praxis-collector-supervisor-metadata). Helm and this script intentionally leave PVCs behind so a reinstall recovers state. Delete with kubectl delete pvc if you want a clean slate. |
| Child collector StatefulSet PVCs | Created by the OTel Operator from volumeClaimTemplates when childCollector.fileStorage.enabled=true. Survive child CR deletion by design. Find with kubectl get pvc -n <ns> and delete manually if no longer needed. |
| Manually-created PVCs | Any PVCs you created outside the installer. Must be deleted separately. |
/var/lib/praxis-edge-collector/ on each node | Cloud-side file_storage hostPath. Not removed by the current uninstall script (script only cleans /var/lib/praxis-collector/). See the warning under "What the Script Does". |