mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-05-22 04:45:19 +00:00
Add recovering etcd steps
This commit is contained in:
committed by
Denise Schannon
parent
5f30df13b6
commit
c71f93142a
@@ -1,34 +0,0 @@
|
||||
---
|
||||
title: Restoring Downstream Kubernetes Cluster
|
||||
weight: 370
|
||||
aliases:
|
||||
- /rancher/v2.x/en/installation/after-installation/restoring-downstream-cluster/
|
||||
---
|
||||
|
||||
Before version 2.2.x Rancher doesn't support backup and restoration of etcd snapshots, to be able to restore etcd cluster on a downstream kubenretes cluster you can run the following procedure:
|
||||
|
||||
1- If etcd lose quorum then the Kubernetes cluster will report a failure in Rancher, the first thing to do is to remove all other etcd nodes and leave only one etcd node in the cluster.
|
||||
|
||||
2- On the remaining node, run the following:
|
||||
|
||||
```
|
||||
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike etcd
|
||||
```
|
||||
|
||||
This command will get the running command for etcd, you should save this command for later.
|
||||
|
||||
3- Now we need to stop and rename the old etcd:
|
||||
|
||||
```
|
||||
$ docker stop etcd
|
||||
$ docker rename etcd etcd-old
|
||||
```
|
||||
|
||||
4- Now we need to make two changes to the running command from step 2:
|
||||
|
||||
- If you originally had more than 1 etcd node, then you need to change `--initial-cluster` to contain only this node.
|
||||
- Add `--force-new-cluster` to the end of the command.
|
||||
|
||||
5- Run the command after the changes in step 3.
|
||||
|
||||
6- Its recommended to add new nodes, if you are using a custom cluster and you will re-add the old node its essential to clean the nodes first before adding them back, See [Node Cleanup](https://rancher.com/docs/rancher/v2.x/en/faq/cleaning-cluster-nodes/) for the procedure.
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
---
|
||||
title: Adding Users to Clusters
|
||||
weight: 2500
|
||||
weight: 100
|
||||
aliases:
|
||||
- /rancher/v2.x/en/tasks/clusters/adding-managing-cluster-members/
|
||||
- /rancher/v2.x/en/cluster-provisioning/cluster-members/
|
||||
---
|
||||
|
||||
If you want to provide a user with access and permissions to _all_ projects, nodes, and resources within a cluster, assign the user a cluster membership.
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Editing Clusters
|
||||
weight: 3015
|
||||
weight: 200
|
||||
---
|
||||
|
||||
After you provision a Kubernetes cluster using Rancher, you can still edit options and settings for the cluster. To edit your cluster, open the **Global** view, make sure the **Clusters** tab is selected, and then select **Ellipsis (...) > Edit** for the cluster that you want to edit.
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: Recovering etcd
|
||||
weight: 300
|
||||
---
|
||||
|
||||
> **Note:** Recovering etcd is only applicable to [Rancher Launched Kubernetes]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/)
|
||||
|
||||
If the etcd cluster loses quorum (see [Count of etcd Nodes]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/production/#count-of-etcd-nodes)), the Kubernetes cluster will report a failure in Rancher because no operations can be executed in the Kubernetes cluster (operations like deploying workloads or scaling workloads). If you want to recover your etcd cluster, you can follow the steps below.
|
||||
|
||||
1- Remove all other etcd nodes and leave only one etcd node in the cluster.
|
||||
|
||||
2- On the single remaining etcd node, run the following command:
|
||||
|
||||
```
|
||||
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike etcd
|
||||
```
|
||||
|
||||
This command will get the running command for etcd, you should save this command for later.
|
||||
|
||||
3- Now we need to stop the etcd container and rename it to `etcd-old`:
|
||||
|
||||
```
|
||||
$ docker stop etcd
|
||||
$ docker rename etcd etcd-old
|
||||
```
|
||||
|
||||
4- Use the command retrieved in step 2 and make the following changes in the command:
|
||||
|
||||
- If you originally had more than 1 etcd node, then you need to change `--initial-cluster` to contain only this node.
|
||||
- Add `--force-new-cluster` to the end of the command.
|
||||
|
||||
5- Run the command after the changes in step 4.
|
||||
|
||||
6- It is recommended to add new nodes with the etcd role. If you are using a custom cluster and you want to reuse the old node, it is essential to clean the nodes first before adding them back. See [Node Cleanup]({{< baseurl >}}/rancher/v2.x/en/faq/cleaning-cluster-nodes/) for the procedure.
|
||||
Reference in New Issue
Block a user