Migrating Satellite worker nodes to RHCOS
Satellite
Complete the following steps to migrate your Satellite worker nodes to RHCOS
To migrate to RHCOS, you must provision a new worker pool, then delete the previous RHEL worker pool. The new worker pool must reside in the same zone as the previous worker pool.
Step 1: Upgrade your cluster master
Run the following command to update the master.
ibmcloud ks cluster master update --cluster <clusterNameOrID> --version 4.18_openshift
Step 2: Creating a new RHCOS worker pool
- Make sure to specify
RHCOSas the--operating-systemof the new pool. - Make sure that the number of nodes specified with the
--size-per-zoneoption matches the number of workers per zone for the RHEL worker pool. To list a worker pool's zones and the number of workers per zone, runibmcloud oc worker-pool get --worker-pool WORKER_POOL --cluster CLUSTER. - Make sure to include the
--entitlement ocp_entitledoption if you have a Cloud Pak entitlement.
-
Run the
ibmcloud oc worker-pool createcommand to create a new worker pool.Example command to create a RHCOS worker pool. Note that for Satellite clusters, you must first attach hosts to your location before you can create a worker pool.
ibmcloud oc worker-pool create satellite --cluster CLUSTER --host-label "os=RHCOS" --name NAME --size-per-zone SIZE --operating-system RHCOS --zone ZONE [--label LABEL] -
Verify that the worker pool is created and note the worker pool ID.
ibmcloud oc worker-pool ls --cluster <cluster_name_or_ID>Example output
Name ID Flavor OS Workers my_workerpool aaaaa1a11a1aa1aaaaa111aa11 b3c.4x16.encrypted REDHAT_8_64 0 -
Add one or more zones to your worker pool. When you add a zone, the number of worker nodes you specified with the
--size-per-zoneoption are added to the zone. These worker nodes run the RHCOS operating system. It's recommended that the zones you add to the RHCOS worker pool match the zones added to the RHEL worker pool that you are replacing. To view the zones attached to a worker pool, runibmcloud oc worker-pool zones --worker-pool WORKER_POOL --cluster CLUSTER. If you add zones that do not match those of RHEL worker pool, make sure that your workloads will not be impacted by moving them to a new zone. Note that File or Block storage are not supported across zones.
Step 3: Add worker nodes to your RHCOS worker pool
Step 4: Migrate your workloads
If you have software-defined storage (SDS) solutions like OpenShift Data Foundation or Portworx, update your storage configurations to include the new worker nodes and verify your workloads before removing your RHEL worker nodes.
For more information about rescheduling workloads, see Safely Drain a Node in the Kubernetes docs or Understanding how to evacuate pods on nodes in the Red Hat OpenShift docs.
-
Migrate per pod by cordoning node and deleting individual pods.
oc adm cordon no/<nodeName> oc delete po -n <namespace> <podName> -
Migrate per Node by draining nodes. For more information, see Safely drain a node.
-
Migrate per worker pool by deleting your entire RHEL worker pool.
ibmcloud ks worker-pool rm --cluster <clusterNameOrID> --worker-pool <workerPoolNameOrID>
Step 5: Remove the RHEL worker nodes
Remove the worker pool that contains the RHEL workers.
Consider scaling down your RHEL worker pool and keeping it for several days before you remove it. This way, you can easily scale the worker pool back up if your workload experiences disruptions during the migration process. When you have determined that your workload is stable and functions normally, you can safely remove the RHEL worker pool.
- List your worker pools and note the name of the worker pool you want to remove.
ibmcloud oc worker-pool ls --cluster CLUSTER - Run the command to remove the worker pool.
ibmcloud oc worker-pool rm --worker-pool WORKER_POOL --cluster CLUSTER
Optional Step 5: Uninstall and reinstall the Object Storage plug-in
If you use the COS plug-in in your cluster, after migrating from RHEL to RHCOS, you must uninstall and reinstall it because the kube-driver path is different between the two operating systems. If this is not done, you may see
an error similar to Error: failed to mkdir /usr/libexec/kubernetes: mkdir /usr/libexec/kubernetes: read-only file system.