Chapter 4. Removing a RHOSO deployment from the RHOCP environment You can remove a Red Hat OpenStack Services on OpenShift (RHOSO) deployment from the Red Hat OpenShift Container Platform (RHOCP) environment if you no longer require the RHOSO deployment. You can also remove any Operators that were installed on your RHOCP cluster for use only by the RHOSO deployment. Note To create a new RHOSO deployment with the same data plane nodes after RHOSO is removed from the RHOCP environment, you must reprovision the nodes. 4.1. Removing RHOSO resources from the RHOCP environment You can remove the resources created for your Red Hat OpenStack Services on OpenShift (RHOSO) deployment from the Red Hat OpenShift Container Platform (RHOCP) environment if you no longer require the RHOSO deployment. Prerequisites You are logged on to a workstation that has access to the Red Hat OpenShift Container Platform (RHOCP) cluster as a user with cluster-admin privileges. Procedure Delete all the OpenStackDataPlaneDeployment objects in the RHOSO namespace: Delete all the OpenStackDataPlaneNodeSet objects in the RHOSO namespace: Delete all the OpenStackDataPlaneService objects in the RHOSO namespace: Delete the OpenStackControlPlane object from the RHOSO namespace: Confirm that all the deployment pods are deleted: Optional: Delete all Persistent Volume Claims (PVCs) from the RHOSO namespace: Tip Create a backup of your PVCs before deletion if you need to reuse them. For information about how to create a PVC backup, see the documentation for the storage backend used in your RHOSO environment. Optional: Release the PV to make it available for other applications: Delete the Secret objects that contain the certificates issued for the control plane services and the data plane nodes when the RHOSO environment was deployed: If the above commands return the message "No resources found" then the certificate secrets were automatically deleted when you deleted the control plane and data plane resources. For information about configuring the cert-manager Operator before RHOSO deployment to automatically delete the certificate secrets, see Deleting a TLS secret automatically upon Certificate removal in the RHOCP Security and Compliance guide. Verify that the resources have been deleted from the namespace: Optional: Delete the namespace: Note You do not need to delete the namespace if you plan to create a new RHOSO deployment in the same namespace. If deleting the namespace is stuck in the terminating state: Check if any remaining objects have a finalizer: Repeat the following command for each remaining object to remove the object finalizers and unblock deletion of each object: 4.2. Removing RHOSO Operators from the RHOCP cluster You can remove any Operators that were installed on your Red Hat OpenShift Container Platform (RHOCP) cluster for use only by the Red Hat OpenStack Services on OpenShift (RHOSO) deployment. For more information about how to remove an Operator and uninstall all the resources associated with the Operator, see Deleting Operators from a cluster in the RHOCP Operators guide.

Commands:
oc delete OpenStackDataPlaneDeployment --all -n openstack
oc delete OpenStackDataPlaneNodeSet --all -n openstack
oc delete OpenStackDataPlaneService --all -n openstack
oc delete openstackcontrolplane -l core.openstack.org/openstackcontrolplane -n openstack
oc get pods -n openstack
oc delete PersistentVolumeClaim -all -n openstack
oc patch PersistentVolume <pv_name> -p '{"spec":{"claimRef": null}}'
oc delete secret -l service-cert -n openstack oc delete secret -l ca-cert -n openstack oc delete secret -l osdp-service -n openstack
oc get all No resources found.
oc delete namespace openstack
oc get USD(oc api-resources|grep openstack.org|cut -d" " -f1 |paste -sd "," -),all -o custom-columns=Kind:.kind,Name:.metadata.name,Finalizers:.metadata.finalizers -n <namespace>
oc patch -n <namespace> <object-name> -p '{"metadata":{"finalizers":[]}}' --type=merge