From df7c770d5e03eb3780dd78ddf4e6f87be30302a0 Mon Sep 17 00:00:00 2001 From: Sherlock113 Date: Thu, 22 Oct 2020 15:37:37 +0800 Subject: [PATCH] Update wording and format of shutting down and restarting a cluster Signed-off-by: Sherlock113 --- ...ing Down and Restart Cluster cracefully.md | 63 ++++++++++--------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/content/en/docs/cluster-administration/Shuting Down and Restart Cluster cracefully.md b/content/en/docs/cluster-administration/Shuting Down and Restart Cluster cracefully.md index aa0c3b1a2..73983e4bf 100644 --- a/content/en/docs/cluster-administration/Shuting Down and Restart Cluster cracefully.md +++ b/content/en/docs/cluster-administration/Shuting Down and Restart Cluster cracefully.md @@ -1,38 +1,37 @@ --- -title: "Shutting Down and Restart Cluster Gracefully" -description: "Demonstrate how to shut down and restart kubernetes cluster Gracefully" +title: "Cluster Shutdown and Restart" +description: "Demonstrate how to shut down and restart Kubernetes clusters gracefully" layout: "single" -linkTitle: "Shutting Down and Restart Cluster Gracefully" -weight: 2000 +linkTitle: "Cluster Shutdown and Restart" +weight: 5000 icon: "/images/docs/docs.svg" --- -This document describes the process to gracefully shut down your cluster. You might need to temporarily shut down your cluster for maintenance reasons. +This document describes the process of gracefully shutting down your cluster and how to restart it. You might need to temporarily shut down your cluster for maintenance reasons. {{< notice warning >}} Shutting down a cluster is very dangerous. You must fully understand the operation and its consequences. Please make an etcd backup before you proceed. Usually, it is recommended to maintain your nodes one by one instead of restarting the whole cluster. {{}} -### Prerequisites -Take an [etcd buckup](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/recovery.md#snapshotting-the-keyspace) prior to shutting down the cluster. -Ssh [keyless login](https://man.openbsd.org/ssh.1#AUTHENTICATION) is set up between hosts. - -### Shutting Down the Cluster -{{< notice warning >}} -You must back up your etcd data before you shut down the cluster as your cluster can be restored if you encounter any issues when restarting the cluster. -{{}} +## Prerequisites +- Take an [etcd backup](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/recovery.md#snapshotting-the-keyspace) prior to shutting down a cluster. +- SSH [passwordless login](https://man.openbsd.org/ssh.1#AUTHENTICATION) is set up between hosts. +## Shutting Down Cluster {{< notice tip >}} -Using the method in this tutorial can shut down a cluster gracefully, while the possibility of data corruption still exists. + +- You must back up your etcd data before you shut down the cluster as your cluster can be restored if you encounter any issues when restarting the cluster. +- Using the method in this tutorial can shut down a cluster gracefully, while the possibility of data corruption still exists. + {{}} -### Step 1: Get the List of Nodes. +### Step 1: Get Node List ```bash nodes=$(kubectl get nodes -o name) ``` -### Step 2: Shut Down all Nodes +### Step 2: Shut Down All Nodes ```bash for node in ${nodes[@]} do @@ -42,32 +41,34 @@ done ``` Then you can shut down other cluster dependencies, such as external storage. -## Restart the Cluster Gracefully -This is about restarting the cluster gracefully after shutting down cluster gracefully. +## Restart Cluster Gracefully +You can restart a cluster gracefully after shutting down the cluster gracefully. ### Prerequisites -You had shutdown your cluster gracefully. +You have shut down your cluster gracefully. {{< notice tip >}} -Usually, the cluster can be used after restarting, but the cluster may be unavailable due to unexpected conditions, for example: -- The Etcd Data Corruption During Shutdown. -- Node Status is Failure. -- Network Exception. +Usually, a cluster can be used after restarting, but the cluster may be unavailable due to unexpected conditions. For example: + +- Etcd data corruption during the shutdown. +- Node failures. +- Unexpected network errors. + {{}} -### Step 1: Check all Cluster Dependencies Status. -Ensure all Cluster Dependencies are Ready, such as External Storage. -### Step 2: Power on cluster machines. -Wait for the cluster make ready, it takes about 10 minutes. -### Step 3: Check all Master Nodes Status. -Check core components status, such as etcd service, make sure everything is ready. +### Step 1: Check All Cluster Dependencies' Status +Ensure all cluster dependencies are ready, such as external storage. +### Step 2: Power on Cluster Machines +Wait for the cluster to be up and running, which may take about 10 minutes. +### Step 3: Check All Master Nodes' Status +Check the status of core components, such as etcd services, and make sure everything is ready. ```bash kubectl get nodes -l node-role.kubernetes.io/master ``` -### Step 4: Check all Woker Nodes Status. +### Step 4: Check All Worker Nodes' Status ```bash kubectl get nodes -l node-role.kubernetes.io/worker ``` -If your cluster fails to restart, maybe you should [restore etcd cluster](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/recovery.md#restoring-a-cluster). +If your cluster fails to restart, please try to [restore the etcd cluster](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/recovery.md#restoring-a-cluster).