How to resize resources on master and worker nodes in baremetal UPI cluster in RHOCP 4?
Environment
- Red Hat OpenShift Container Platform 4.x
- Bare metal
- UPI
Issue
- How to increase/reduce the CPU and Memory resources in OpenShift baremetal cluster?
- Is it possible to reduce node resources on a baremetal cluster?
Resolution
- It is possible to increase/reduce the baremetal node resources but as it requires hardware changes on the baremetal node, you need to consult with the respective hardware vendor to perform the hardware resources changes.
- Before reducing node resources, check the node resource utilization and then as per the requirement reduce the node resources. Refer to documentation for minimum requirements for baremetal OCP clusters.
- To resize the hardware resources below steps can be used. The procedure can be applied while the cluster is running, but for one node at a time:
1. Cordon and drain the node
$ oc adm cordon <node_name>
$ oc adm drain <node_name> --force --ignore-daemonsets
2. Power down the node
Power down the node, this is a condition for most hardware changes.
3. Hardware change
Perform the hardware resource changes(resource addition or reduction) with the help of the respective hardware vendor.
4. Check the services
After the node is back up, you need to ensure it's healthy and has rejoined the cluster with the new CPU capacity.
-
Check Node Status: Verify that the node is Ready and that the
MachineConfigOperatorhas correctly applied its configuration to the node.oc get nodes -
Verify CPU Capacity: Check the node's capacity to ensure the new CPU cores are visible.
oc describe node node_name | grep 'cpu' -
Uncordon the Node: Allow the node to accept new pods again.
oc adm uncordon node_name -
Services: Confirm that the kubelet and crio services are running fine on the respective node.
$ systemctl status kubelet $ systemctl status crio
5. Uncordon the node
If the services are running fine as per last step, uncordon the node.
$ oc adm uncordon <node_name>
6. Check for CSRs in pending state
Check if any CSRs are in pending state, approve it if there are any. Check node health of the affected node.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.