I am a bit confused regarding how do I check an etcd cluster's health. Should I use
etcdctl cluster-health
or etcdctl --cluster=true endpoint health
. Is the former command deprecated now? If yes, then from which version?
I have once etcd cluster where the version of etcd is 3.4.22 - etcd --version
etcd Version: 3.4.22
Git SHA: 1f05498
Go Version: go1.16.15
Go OS/Arch: linux/amd64
For this setup, when running etcdctl cluster-health
, I get this error:
Error: unknown command "cluster-health" for "etcdctl"
Run 'etcdctl --help' for usage.
Error: unknown command "cluster-health" for "etcdctl"
But, when I run etcdctl --cluster=true endpoint health
, it executes successfully:
http://<node1>:2379 is healthy: successfully committed proposal: took = 1.852206ms
http://<node2>:2379 is healthy: successfully committed proposal: took = 3.440616ms
http://<node3>:2379 is healthy: successfully committed proposal: took = 2.860144ms
I found one comment saying etcdctl cluster-health is deprecated in V3 - https://stackoverflow.com/a/66994335/11712870. Here, V3 refers to etcd version 3.x, or is it something else?