# Uninstall Pentaho Data Catalog from OpenShift (OCP/OKD)

Sometimes, as an admin, you may want to remove the Pentaho Data Catalog when it is no longer required, such as when decommissioning an environment, redeploying PDC with a different configuration, or freeing cluster resources. This topic describes how to uninstall Data Catalog from an OpenShift Container Platform (OCP) or OKD cluster and remove the associated OpenShift resources.

**Before you begin**

Ensure that the following requirements are met:

* You can access the OpenShift cluster from your system.
* You have permissions to delete namespaces and cluster-level resources.
* You know the namespace in which Data Catalog is deployed.

**Procedure**

1. Run Helmfile to remove the Data Catalog deployment from the OpenShift cluster.

   ```
   helmfile destroy -n <namespace>
   ```

   This command removes all Data Catalog Helm releases deployed in the specified namespace.
2. Delete the namespace used for the Data Catalog deployment.

   ```
   kubectl delete ns <namespace>
   ```

   Deleting the namespace removes all remaining Kubernetes resources associated with Data Catalog.
3. Remove the cluster-level roles and bindings created for the Data Catalog deployment.

   ```
   oc delete clusterrole secret-reader
   oc delete clusterrolebinding deployer-secret-binding
   ```

   These resources are not removed automatically when the namespace is deleted.

**Result**

Data Catalog is removed from the OpenShift (OCP/OKD) cluster, and all associated namespaces and cluster-level resources are deleted.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pentaho.com/pdc-10.2-install/uninstall-pentaho-data-catalog/uninstall-pentaho-data-catalog-from-openshift-ocp-okd.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
