How to delete a non-dp-namespace

How to delete a non-dp-namespace

book

Article ID: KB0138283

calendar_today

Updated On:

Products Versions
TIBCO Platform - Control Plane All

Description

Objective
To safely and completely remove an application namespace by following the correct deletion sequence: Delete Apps Uninstall Helm Chart Delete Namespace.
Procedure
Follow these steps in the exact order presented.
Step 1: Delete Deployed Applications
Delete the applications from CP WebUI or TIBCO PlatformCLI or RESTAPI
Step 2: Uninstall the Namespace Configuration Helm Chart
Secondary namespaces are typically configured using the dp-configure-namespace Helm chart (or similar infrastructure charts) to set up RBAC, Network Policies, and Service Accounts. This chart must be uninstalled to clean up these configurations cleanly.
  1. List the helm releases in the target namespace to confirm the release name (usually dp-configure-namespace):
    helm ls -n <secondary/app-namespace>
  2. Uninstall the chart:
    helm uninstall dp-configure-namespace --namespace <secondary/app-namespace>
Step 3: Delete the Kubernetes Namespace
Once the workloads (Apps) and configurations (Helm Chart) are removed, it is safe to delete the namespace itself.

 Run the kubectl delete command

kubectl delete ns <secondary/app-namespace>

Troubleshooting

If the namespaces has been deleted from the cluster directly, you may need to recreate the namespace and delete it again follow the procedure. Otherwise, CP wont know the namespace is deleted.

Environment

All

Issue/Introduction

When removing a secondary namespace or cleaning up a non-dataplance-namespace in TIBCO Platform, it is critical to follow a specific order of operations. Deleting the namespace before removing the applications and configuration charts can lead to orphaned resources, stuck namespaces (terminating state), or residual artifacts in the Control Plane database.