Uninstalling a cluster on IBM Power Virtual Server¶
To remove a OpenShift Container Platform cluster that you deployed on IBM Power(R) Virtual Server, run the delete cluster command to remove all associated cloud resources.
Removing a cluster that uses installer-provisioned infrastructure¶
To remove an OpenShift Container Platform cluster that uses installer-provisioned infrastructure, you can use the installation program and the installation files from your original deployment to uninstall the cluster from your cloud platform.
Note
After uninstallation, check your cloud provider for any resources that were not removed properly, especially with user-provisioned infrastructure clusters. Some resources might exist because either the installation program did not create the resource or could not access the resource.
Prerequisites
- You have a copy of the installation program that you used to deploy the cluster.
- You have the files that the installation program generated when you created your cluster.
- You have configured the
ccoctlbinary. - You have installed the IBM Cloud(R) CLI and installed or updated the VPC infrastructure service plugin. For more information see "Prerequisites" in the IBM Cloud(R) CLI documentation.
Procedure
-
If the following conditions are met, this step is required:
-
The installer created a resource group as part of the installation process.
-
You or one of your applications created persistent volume claims (PVCs) after the cluster was deployed.
In which case, the PVCs are not removed when uninstalling the cluster, which might prevent the resource group from being successfully removed. To prevent a failure:
-
Log in to the IBM Cloud(R) using the CLI.
-
To list the PVCs, run the following command:
For more information about listing volumes, see the IBM Cloud(R) CLI documentation.
-
To delete the PVCs, run the following command:
For more information about deleting volumes, see the IBM Cloud(R) CLI documentation.
-
-
-
Export the API key that was created as part of the installation process.
Note
You must set the variable name exactly as specified. The installation program expects the variable name to be present to remove the service IDs that were created when the cluster was installed.
-
From the directory that has the installation program on the computer that you used to install the cluster, run the following command:
where:
<installation_directory>- Specify the path to the directory that you stored the installation files in.
--log-level info- To view different details, specify
warn,debug, orerrorinstead ofinfo.
Note
- You must specify the directory that has the cluster definition files for your cluster. The installation program requires the
metadata.jsonfile in this directory to delete the cluster. - You might have to run the
openshift-install destroycommand up to three times to ensure a proper cleanup.
-
Remove the manual CCO credentials that were created for the cluster:
$ ccoctl ibmcloud delete-service-id \ --credentials-requests-dir <path_to_credential_requests_directory> \ --name <cluster_name>Note
If your cluster uses Technology Preview features that are enabled by the
TechPreviewNoUpgradefeature set, you must include the--enable-tech-previewparameter. -
Optional: Delete the
<installation_directory>directory and the OpenShift Container Platform installation program.