Uninstall & Cleanup

This guide provides instructions for completely removing Observo Site and its associated resources from your Kubernetes cluster.

Pre-cleanup Steps

1. Identify Resources

# List all resources in namespace
kubectl get all -n observo-client

# List persistent volumes
kubectl get pvc -n observo-client

# List configmaps
kubectl get configmaps -n observo-client

# List secrets
kubectl get secrets -n observo-client

2. Backup Critical Data

# Backup Helm values
helm get values observo-site -n observo-client > site-values-backup.yaml

# Backup important configmaps
kubectl get configmap -n observo-client -o yaml > configmaps-backup.yaml

# Backup custom secrets if any
kubectl get secret <secret-name> -n observo-client -o yaml > secrets-backup.yaml

Uninstallation Steps

1. Remove Helm Release

# List helm releases
helm list -n observo-client

# Uninstall site
helm uninstall observo-site -n observo-client

2. Delete Persistent Volumes

# List PVCs
kubectl get pvc -n observo-client

# Delete specific PVCs
kubectl delete pvc -l app=observo-site -n observo-client

# Delete all PVCs in namespace
kubectl delete pvc --all -n observo-client

3. Remove the Namespace

kubectl delete namespace observo-client

Additional Cleanup

1. Load Balancer Cleanup

If using cloud providers:

# List services with load balancers
kubectl get svc -n observo-client -o wide

# Check cloud provider console for orphaned resources:
# - Load Balancers
# - Target Groups
# - Security Groups

2. DNS Cleanup

  • Remove any DNS entries created for ingress

  • Clean up external-dns resources if used

  • Remove TLS certificates from cert-manager

3. Storage Cleanup

# List persistent volumes
kubectl get pv | grep observo-client

# Remove orphaned volumes
kubectl patch pv <pv-name> -p '{"metadata":{"finalizers":null}}'

Verification Steps

1. Verify Resource Removal

# Check for remaining resources
kubectl get all -n observo-client

# Check for persistent volumes
kubectl get pv | grep observo-client

# Verify namespace removal
kubectl get namespace observo-client

Troubleshooting

Stuck Namespace

If namespace remains in Terminating state:

# Get namespace details
kubectl get namespace observo-client -o json > ns.json

# Remove finalizers
# Edit ns.json to remove finalizers array

# Update namespace
kubectl replace --raw "/api/v1/namespaces/observo-client/finalize" -f ns.json

Stuck Resources

# For stuck PVCs
kubectl patch pvc <pvc-name> -n observo-client -p '{"metadata":{"finalizers":null}}'

# For other stuck resources
kubectl patch <resource-type> <resource-name> -n observo-client \
    -p '{"metadata":{"finalizers":[]}}' --type=merge

Last updated

Was this helpful?