oc
plugin to resize a Machine on OpenShift cluster.
!!! tldr "Important Note" - All steps described here will follow the safety way to resize a Machine in OCP 4.x. - This is not a official documentation and this plugin was tested on version 4.9
Download the script:
curl -s https://github.com/mtulio/oc-plugin-machine-resize/blob/master/oc-machine_resize \
-o /usr/local/bin/oc-machine_resize
Grant permissions to run:
chmod u+x /usr/local/bin/oc-machine_resize
Test it:
oc machine-resize -h
--help
--list-machines | -l
--machine-name <machine_to_resize> --size <new_machine_size> [--force|--continue]
Extra args:
--force
: force to skip healthy checks. Eg if node holds a etcd leader pod--continue
: continue to stop from broken script. Eg when node was already cordoned/stopped, and not resize from cloud provider. It will skip the initial sanity checks (Eg: Ready node)
- list current machines
oc machine-resize -l
- resize a nachine
oc machine-resize -N mrb-gptgl-master-1 -s m5.xlarge
- resize a nachine that holds the etcd leader pod
oc machine-resize -N mrb-gptgl-master-0 -s m5.xlarge --force
- support new platforms: Azure
- increase the final healthy checks:
- check if COs are not degraded
- check apiserver, etcd pods
- check etcd cluster: health ndoes, leaders, etc
- firing alarms?