Skip to content

Commit

Permalink
Update etcd backup restore doc cmd when grabbing etcd container id (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jiayiwang7 authored Nov 21, 2023
1 parent 2d2346e commit 9f866a2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Make sure to setup the [admin environment variables]({{< relref "#admin-machine-
1. Set these environment variables
```bash
# get the container ID corresponding to etcd pod
export ETCD_CONTAINER_ID=$(ctr -n k8s.io c ls | grep -w "etcd-io" | cut -d " " -f1)
export ETCD_CONTAINER_ID=$(ctr -n k8s.io c ls | grep -w "etcd-io" | head -1 | cut -d " " -f1)
# get the etcd endpoint
export ETCD_ENDPOINT=$(cat /etc/kubernetes/manifests/etcd | grep -wA1 ETCD_ADVERTISE_CLIENT_URLS | tail -1 | grep -oE '[^ ]+$')
Expand Down Expand Up @@ -172,7 +172,7 @@ Make sure to setup the [admin environment variables]({{< relref "#admin-machine-
export INITIAL_CLUSTER_TOKEN="etcd-cluster-1"
# get the container ID corresponding to etcd pod
export ETCD_CONTAINER_ID=$(ctr -n k8s.io c ls | grep -w "etcd-io" | cut -d " " -f1)
export ETCD_CONTAINER_ID=$(ctr -n k8s.io c ls | grep -w "etcd-io" | head -1 | cut -d " " -f1)
# run the restore command
ctr -n k8s.io t exec -t --exec-id etcd ${ETCD_CONTAINER_ID} etcdctl \
Expand Down

0 comments on commit 9f866a2

Please sign in to comment.