How to increase Resources for Worker and Master Nodes in RHOCP 4 for VMware
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4.6+
- UPI Installation
Issue
- How to safely increase or refresh a node's CPU/Memory capacity?
Resolution
-
Note:
- To resize nodes on AWS or Azure, refer to How to resize nodes in OCP 4.6 or later for AWS or Azure
- To resize bare metal nodes, refer to How to resize resources on master and worker nodes in baremetal UPI cluster in RHOCP 4?
-
It is possible to add more resources to the nodes directly from the hypervisor manager (vCenter).
-
The procedure can be applied while the cluster is running, but for one node at a time:
1. Cordon and drain the node
# If using RHOCP 4.6 use this command
$ oc adm drain <NODENAME> --delete-local-data --grace-period=1 --ignore-daemonsets
# If using RHOCP >=4.7 use this command
$ oc adm drain <NODENAME> --delete-emptydir-data --grace-period=1 --ignore-daemonsets
2. Node shutdown
Once the drain has finished, shut down the node, either by command or via vCenter.
3. Add resources
Add any needed resources through with vCenter VM / Edit Setting.
4. Start node
Start the node in vCenter. Then wait until oc get node <NODENAME> -o wide shows it as Ready (although it may still be SchedulingDisabled)
5. Uncordon the node
$ oc adm uncordon <NODENAME>
Wait until all the clusteroperators are neither progressing nor degraded as per oc get co -o wide. If they don't stabilize after a long time, stop and ask for assistance via Support Case.
6. Update machinesets
-
Update any machinesets so that nodes created in the future will be sized appropriately.
-
For IPI Installation please refer How to add resources to node IPI
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.