Removing hosts and locations
When you remove a host from your location, the host is unassigned from a Satellite-enabled IBM Cloud service cluster or the Satellite location control plane, detached from the location, and no longer available to run workloads from Satellite. If you delete a Red Hat OpenShift cluster or resize a worker pool, the hosts are still attached to your location, but you must detach and reattach the hosts to use them with another Satellite resource.
After removal, the host machine still exists in your underlying infrastructure provider. Reload the operating system before using the host machine for another purpose.
Removing hosts from the console
Use the Satellite console to remove your hosts as compute capacity from the Satellite location.
Removing a host cannot be undone. Before you remove a host, make sure that your cluster or location control plane has enough compute resources to continue running even after you remove the host, or back up any data that you want to keep.
- Make sure that your cluster or location control plane has enough compute resources to continue running even after you remove the host, or back up any data that you want to keep.
- From the Satellite console, click Locations and then click your location.
- From the Hosts table, find the host that you want to remove.
- Depending on the type of host, remove the host from a cluster before you remove the host.
- If the host Cluster is
Control plane
, continue to the next step. - If the host Cluster is a hyperlink to the name of a Red Hat OpenShift on IBM Cloud cluster, note the host IP address and click the cluster name hyperlink.
- From the cluster Worker Nodes tab, find the worker node with an IP address that matches the IP address of the host that you want to remove.
- Select the worker node.
- From the table action menu, click Delete.
- In the confirmation message, clear the option to replace the worker node and click Delete.
- Return to the Satellite Locations > Hosts table.
- If the host Cluster is
- From the Hosts table, hover over the host that you want to remove and click the Action menu icon .
- Click Remove host, enter the host name to confirm deletion, and click Remove.
- Follow the instructions from your underlying infrastructure provider to complete one of the following actions:
- To reuse the host for other purposes, reload the operating system of the host. For example, you might reattach the host to a Satellite location later. When you reattach a host, the host name can remain the same as the previous name, but a new host ID is generated.
- To no longer use the host, delete the host from your infrastructure provider.
After the host is removed, shut it down and do not activate it again without reloading the OS.
Removing hosts with the CLI
Use the CLI plug-in for Satellite commands to remove your hosts as compute capacity from the Satellite location.
Removing a host cannot be undone. Before you remove a host, make sure that your cluster or location control plane has enough compute resources to continue running even after you remove the host, or back up any data that you want to keep. Note that the underlying host infrastructure is not deleted.
- Make sure that your cluster or location control plane has enough compute resources to continue running even after you remove the host, or back up any data that you want to keep.
- Log in your IBM Cloud account. If you have a federated account, include the
--sso
option, or create an API key to log in.ibmcloud login [--sso]
- List your locations and note the name of the location for the host that you want to remove.
ibmcloud sat location ls
- List your hosts. If the host is assigned to a cluster (and not to infrastructure) note the worker ID of the host that you want to remove.
Example outputibmcloud sat host ls --location <location_name_or_ID>
Retrieving hosts... OK Name ID State Status Cluster Worker ID Worker IP machine-name-1 aaaaa1a11aaaaaa111aa assigned Ready infrastructure sat-virtualser-4d7fa07cd3446b1f9d8131420f7011e60d372ca2 169.xx.xxx.xxx machine-name-2 bbbbbbb22bb2bbb222b2 assigned Ready infrastructure sat-virtualser-9826f0927254b12b4018a95327bd0b45d0513f59 169.xx.xxx.xxx machine-name-3 ccccc3c33ccccc3333cc assigned Ready mycluster12345 sat-virtualser-948b454ea091bd9aeb8f0542c2e8c19b82c5bf7a 169.xx.xxx.xxx
- If your host is assigned to a cluster, remove the worker node of the host by using the cluster name and worker ID that you previously retrieved.
ibmcloud ks worker rm --cluster <cluster_name> --worker <worker_ID>
- Remove the host from your Satellite location.
ibmcloud sat host rm --location <location_name_or_ID> --host <host_ID>
- Follow the instructions from your underlying infrastructure provider to complete one of the following actions:
- To reuse the host for other purposes, reload the operating system of the host. For example, you might reattach the host to a Satellite location later. When you reattach a host, the host name can remain the same as the previous name, but a new host ID is generated.
- To no longer use the host, delete the host from your infrastructure provider.
Removing locations from the console
Use the Satellite console to remove your locations.
Removing a location cannot be undone. Before you remove a location, back up any information that you want to keep and remove any hosts and clusters that run in the location. Note that the underlying host infrastructure is not automatically deleted when you delete a location because you manage the infrastructure yourself.
- Remove all Red Hat OpenShift on IBM Cloud clusters from your location.
- Remove all hosts from your location.
- From the Satellite console Locations table, hover over the location that you want to remove and click the Action menu icon .
- Click Remove location, enter the location name to confirm the deletion, and click Remove.
Now that the location is removed, check the hosts in your underlying infrastructure provider. To reuse the hosts for other purposes, you must reload the operating system. If you no longer need the hosts, delete them from your infrastructure provider.
Removing locations with the CLI
Use the CLI plug-in for Satellite commands to remove your locations.
Removing a location cannot be undone. Before you remove a location, back up any information that you want to keep and remove any hosts and clusters that run in the location. Note that the underlying host infrastructure is not automatically deleted when you delete a location because you manage the infrastructure yourself.
-
Remove all Red Hat OpenShift on IBM Cloud clusters from your location.
-
Remove all hosts from your location.
-
Remove the location.
ibmcloud sat location rm --location <location_name_or_ID>
-
Confirm that your location is removed. The location no longer is displayed in the output of the following command.
ibmcloud sat location ls
Now that the location is removed, check the hosts in your underlying infrastructure provider. To reuse the hosts for other purposes, you must reload the operating system. If you no longer need the hosts, delete them from your infrastructure provider.
If you provisioned storage devices for your location, cluster, or services; or used dynamic provisioning to provision storage in your PVCs, make sure to remove the storage devices that you no longer need after removing your location. If you created a location using cloud provider infrastructure, make sure to remove the storage from your account to avoid incurring charges.