Skip to content

Commit 70936d4

Browse files
ericsmallingk8s-ci-robot
authored andcommitted
Update cluster health check command for newer etcd (#18392)
* Update cluster health check command for newer etcd Existing docs assume the older (v3.2) etcdctl `health-check` command but with a 3.4.3 cluster (which is what kubeadm creates in the static manifest now), that subcommand is no longer supported and returns 404 errors like: ``` root@etcd-1:~# docker run --rm -it --net host -v /etc/kubernetes:/etc/kubernetes quay.io/coreos/etcd:${ETCD_TAG} etcdctl --cert-file /etc/kubernetes/pki/etcd/peer.crt --key-file /etc/kubernetes/pki/etcd/peer.key --ca-file /etc/kubernetes/pki/etcd/ca.crt --endpoints https://10.170.68.181:2379 cluster-health cluster may be unhealthy: failed to list members Error: unexpected status code 404 ``` * PR review changes
1 parent f318b7c commit 70936d4

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

content/en/docs/setup/production-environment/tools/kubeadm/setup-ha-etcd-with-kubeadm.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,17 @@ this example.
251251
```sh
252252
docker run --rm -it \
253253
--net host \
254-
-v /etc/kubernetes:/etc/kubernetes quay.io/coreos/etcd:${ETCD_TAG} etcdctl \
255-
--cert-file /etc/kubernetes/pki/etcd/peer.crt \
256-
--key-file /etc/kubernetes/pki/etcd/peer.key \
257-
--ca-file /etc/kubernetes/pki/etcd/ca.crt \
258-
--endpoints https://${HOST0}:2379 cluster-health
254+
-v /etc/kubernetes:/etc/kubernetes k8s.gcr.io/etcd:${ETCD_TAG} etcdctl \
255+
--cert /etc/kubernetes/pki/etcd/peer.crt \
256+
--key /etc/kubernetes/pki/etcd/peer.key \
257+
--cacert /etc/kubernetes/pki/etcd/ca.crt \
258+
--endpoints https://${HOST0}:2379 endpoint health --cluster
259259
...
260-
cluster is healthy
260+
https://[HOST0 IP]:2379 is healthy: successfully committed proposal: took = 16.283339ms
261+
https://[HOST1 IP]:2379 is healthy: successfully committed proposal: took = 19.44402ms
262+
https://[HOST2 IP]:2379 is healthy: successfully committed proposal: took = 35.926451ms
261263
```
262-
- Set `${ETCD_TAG}` to the version tag of your etcd image. For example `v3.2.24`.
264+
- Set `${ETCD_TAG}` to the version tag of your etcd image. For example `3.4.3-0`. To see the etcd image and tag that kubeadm uses execute `kubeadm config images list --kubernetes-version ${K8S_VERSION}`, where `${K8S_VERSION}` is for example `v1.17.0`
263265
- Set `${HOST0}`to the IP address of the host you are testing.
264266
265267
{{% /capture %}}

0 commit comments

Comments
 (0)