Shutting down the cluster gracefully
- Take an prior to shutting down the cluster.
You can shut down your cluster in a graceful manner so that it can be restarted at a later date.
Prerequisites
You have taken an etcd backup.
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:
Node failure due to hardware
Network connectivity issues
If your cluster fails to recover, follow the steps to restore to a previous cluster state.
Procedure
Shut down all of the nodes in the cluster. You can do this from your cloud provider’s web console, or run the following loop:
Shutting down the nodes using one of these methods allows pods to terminate gracefully, which reduces the chance for data corruption.
Adjust the shut down time to be longer for large-scale clusters:
Shut off any cluster dependencies that are no longer needed, such as external storage or an LDAP server. Be sure to consult your vendor’s documentation before doing so.
If you deployed your cluster on a cloud-provider platform, do not shut down, suspend, or delete the associated cloud resources. If you delete the cloud resources of a suspended virtual machine, OKD might not restore successfully.