Graceful Shutdown of an Openshift 4 Cluster
This SOP should be followed in the following scenarios:
- 
Graceful full shut down of the Openshift 4 cluster is required. 
Steps
Prequisite steps:
- Follow the SOP for cordoning and draining the nodes.
- Follow the SOP for creating an etcd backup.
- 
Connect to the os-control01host associated with this ENV. Become rootsudo su -.
- 
Get a list of the nodes nodes=$(oc get nodes -o name | sed -E "s/node\///") 
- 
Shutdown the nodes from the administration box associated with the cluster ENVeg production/staging.for node in ${nodes[@]}; do ssh -i /root/ocp4/ocp-<ENV>/ssh/id_rsa core@$node sudo shutdown -h now; done
Want to help? Learn how to contribute to Fedora Docs ›