Graceful System Reboot#

Important

This section is relevant only if the cluster and applications are already deployed, and you need to reboot the system or if the system gets rebooted unexpectedly.

Before Rebooting#

Scale down the deployments.

Run the following command to scale down the deployments, which ensures that all pods are terminated gracefully before the system reboot:

kubectl scale deployment --all --replicas=0

After Rebooting#

Scale up the deployments.

After the system reboots, wait for the cluster to fully initialize. Then, scale up the deployments by running the following command:

kubectl scale deployment --all --replicas=1

This command sets all deployments to one replica.

Recovery Procedure#

If the system gets rebooted without following the steps for a graceful reboot, wait for the CNS stack to initialize completely. Then remove all pods that do not have the Running status by using the following command:

kubectl delete pods --field-selector status.phase!=Running