mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
177 lines
6.5 KiB
Plaintext
177 lines
6.5 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * installing/installing_aws/uninstalling-cluster-aws.adoc
|
|
// * installing/installing_azure/uninstalling-cluster-azure.adoc
|
|
// * installing/installing_azure/uninstalling-cluster-azure-stack-hub.adoc
|
|
// * installing/installing_gcp/uninstalling-cluster-gcp.adoc
|
|
// * installing/installing_ibm_cloud/uninstalling-cluster-ibm-cloud.adoc
|
|
// * installing/installing_ibm_powervs/uninstalling-cluster-ibm-power-vs.adoc
|
|
// * installing/installing_osp/uninstalling-cluster-openstack.adoc
|
|
// * installing/installing_vmc/uninstalling-cluster-vmc.adoc
|
|
// * installing/installing_vsphere/uninstalling-cluster-vsphere-installer-provisioned.adoc
|
|
// * installing/installing_nutanix/uninstalling-cluster-nutanix.adoc
|
|
|
|
ifeval::["{context}" == "uninstalling-cluster-aws"]
|
|
:aws:
|
|
endif::[]
|
|
ifeval::["{context}" == "uninstalling-cluster-gcp"]
|
|
:gcp:
|
|
endif::[]
|
|
ifeval::["{context}" == "uninstalling-cluster-ibm-cloud"]
|
|
:ibm-cloud:
|
|
endif::[]
|
|
ifeval::["{context}" == "uninstalling-cluster-ibm-power-vs"]
|
|
:ibm-power-vs:
|
|
endif::[]
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="installation-uninstall-clouds_{context}"]
|
|
= Removing a cluster that uses installer-provisioned infrastructure
|
|
|
|
You can remove a cluster that uses installer-provisioned infrastructure from your cloud.
|
|
|
|
ifdef::aws[]
|
|
[NOTE]
|
|
====
|
|
If you deployed your cluster to the AWS C2S Secret Region, the installation program does not support destroying the cluster; you must manually remove the cluster resources.
|
|
====
|
|
endif::aws[]
|
|
|
|
[NOTE]
|
|
====
|
|
After uninstallation, check your cloud provider for any resources not removed properly, especially with User Provisioned Infrastructure (UPI) clusters. There might be resources that the installer did not create or that the installer is unable to access.
|
|
ifdef::gcp[]
|
|
For example, some Google Cloud resources require link:https://cloud.google.com/iam/docs/overview#concepts_related_to_access_management[IAM permissions] in shared VPC host projects, or there might be unused link:https://cloud.google.com/sdk/gcloud/reference/compute/health-checks/delete[health checks that must be deleted].
|
|
endif::gcp[]
|
|
====
|
|
|
|
.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.
|
|
ifdef::ibm-cloud,ibm-power-vs[]
|
|
* You have configured the `ccoctl` binary.
|
|
* You have installed the {ibm-cloud-name} CLI and installed or updated the VPC infrastructure service plugin. For more information see "Prerequisites" in the link:https://cloud.ibm.com/docs/vpc?topic=vpc-infrastructure-cli-plugin-vpc-reference&interface=ui#cli-ref-prereqs[{ibm-cloud-name} CLI documentation].
|
|
endif::ibm-cloud,ibm-power-vs[]
|
|
|
|
.Procedure
|
|
ifdef::ibm-cloud,ibm-power-vs[]
|
|
. 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-name} using the CLI.
|
|
.. To list the PVCs, run the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ ibmcloud is volumes --resource-group-name <infrastructure_id>
|
|
----
|
|
+
|
|
For more information about listing volumes, see the link:https://cloud.ibm.com/docs/vpc?topic=vpc-infrastructure-cli-plugin-vpc-reference&interface=ui#volume-cli[{ibm-cloud-name} CLI documentation].
|
|
|
|
.. To delete the PVCs, run the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ ibmcloud is volume-delete --force <volume_id>
|
|
----
|
|
+
|
|
For more information about deleting volumes, see the link:https://cloud.ibm.com/docs/vpc?topic=vpc-infrastructure-cli-plugin-vpc-reference&interface=ui#volume-delete[{ibm-cloud-name} CLI documentation].
|
|
|
|
. Export the API key that was created as part of the installation process.
|
|
endif::ibm-cloud,ibm-power-vs[]
|
|
ifdef::ibm-cloud[]
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ export IC_API_KEY=<api_key>
|
|
----
|
|
+
|
|
endif::ibm-cloud[]
|
|
ifdef::ibm-power-vs[]
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ export IBMCLOUD_API_KEY=<api_key>
|
|
----
|
|
+
|
|
endif::ibm-power-vs[]
|
|
ifdef::ibm-cloud,ibm-power-vs[]
|
|
[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.
|
|
====
|
|
endif::ibm-cloud,ibm-power-vs[]
|
|
. From the directory that contains the installation program on the computer that you used to install the cluster, run the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ ./openshift-install destroy cluster \
|
|
--dir <installation_directory> --log-level info <1> <2>
|
|
----
|
|
<1> For `<installation_directory>`, specify the path to the directory that you
|
|
stored the installation files in.
|
|
<2> To view different details, specify `warn`, `debug`, or `error` instead of `info`.
|
|
ifndef::ibm-power-vs[]
|
|
+
|
|
[NOTE]
|
|
====
|
|
You must specify the directory that contains the cluster definition files for
|
|
your cluster. The installation program requires the `metadata.json` file in this
|
|
directory to delete the cluster.
|
|
====
|
|
endif::ibm-power-vs[]
|
|
ifdef::ibm-power-vs[]
|
|
+
|
|
[NOTE]
|
|
====
|
|
* You must specify the directory that contains the cluster definition files for
|
|
your cluster. The installation program requires the `metadata.json` file in this
|
|
directory to delete the cluster.
|
|
|
|
* You might have to run the `openshift-install destroy` command up to three times to ensure a proper cleanup.
|
|
====
|
|
endif::ibm-power-vs[]
|
|
|
|
ifdef::ibm-cloud,ibm-power-vs[]
|
|
. Remove the manual CCO credentials that were created for the cluster:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ 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 `TechPreviewNoUpgrade` feature set, you must include the `--enable-tech-preview` parameter.
|
|
====
|
|
--
|
|
endif::ibm-cloud,ibm-power-vs[]
|
|
|
|
. Optional: Delete the `<installation_directory>` directory and the
|
|
{product-title} installation program.
|
|
|
|
|
|
ifeval::["{context}" == "uninstalling-cluster-aws"]
|
|
:!aws:
|
|
endif::[]
|
|
ifeval::["{context}" == "uninstalling-cluster-gcp"]
|
|
:!gcp:
|
|
endif::[]
|
|
ifeval::["{context}" == "uninstalling-cluster-ibm-cloud"]
|
|
:!ibm-cloud:
|
|
endif::[]
|
|
ifeval::["{context}" == "uninstalling-cluster-ibm-power-vs"]
|
|
:!ibm-power-vs:
|
|
endif::[]
|
|
|
|
// The above CCO credential removal for {ibm-cloud-title} is only necessary for manual mode. Future releases that support other credential methods will not require this step.
|