Shutdown
Some information about shutting down a cluster¶
Guide to gracefully shut down your cluster.
Warning
Important It is important to take an etcd backup before performing this procedure so that your cluster can be restored if you encounter any issues when restarting the cluster.
For example, the following conditions can cause the restarted cluster to malfunction:
- etcd data corruption during shutdown
- Node failure due to hardware
- Network connectivity issues
Certificate Expiration¶
Check the expiration date of the cluster certificates.
Info
To ensure that the cluster can restart gracefully, plan to restart it on or before the specified date. As the cluster restarts, the process might require you to manually approve the pending certificate signing requests (CSRs) to recover kubelet certificates.
Cordon and evacuate the Nodes¶
Mark all the nodes in the cluster as unschedulable.
Evacuate the pods using the following method:
Shutdown the Nodes¶
Shut down all of the nodes in the cluster.
Note
It is not necessary to drain control plane nodes of the standard pods that ship with OpenShift Container Platform prior to shutdown. Cluster administrators are responsible for ensuring a clean restart of their own workloads after the cluster is restarted. If you drained control plane nodes prior to shutdown because of custom workloads, you must mark the control plane nodes as schedulable before the cluster will be functional again after restart.
Shutting down OpenShift with Ceph / OpenShift Data Foundations (simplified)¶
Source (origin): Shutting down OpenShift with Ceph / OpenShift Data Foundations (simplified)
Steps:
- Setup some connection variables
- Mark the OpenShift nodes as unschedulable which prevents Pods & VMs from restarting
- Stop everything using ODF a. VMs - gracefully shutdown with oc delete VirtualMachineInstance/... b. Monitoring - graceful shutdown with oc delete Pod/... c. other apps
-
Shutdown the nodes (remaining ODF processes, kube-apiserver, etcd, and other OCP processes)
- Shutdown OCP last
The script below tries to gracefully shutdown a 3-node / "compact" OCP cluster.
Sources¶
- Docs - Shutting down the cluster gracefully
- John Call via HackMD - Shutting down OpenShift with Ceph / OpenShift Data Foundations (simplified)