Background
Created a fresh Kubernetes cluster using kubeadm init --config /home/kube/kubeadmn-config.yaml --upload-certs
and then joining the 2nd control plane node by running the below.
kubeadm join VIP:6443 --token <token> \
--discovery-token-ca-cert-hash sha256:<hash> \
--control-plane --certificate-key <key> \
--v=5
Question
Is etcdctl commands supposed to come back with a return value? Either using the command directly or using the docker exec method shown below. I have these packages installed kubeadm, kubectl, kubelet, and docker.
Kubectl version: 1.20.1 OS: Ubuntu 18.04
Commands from the first node
Command
etcdctl cluster-health
Response
cluster may be unhealthy: failed to list members
Error: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: connect: connection refused
; error #1: EOF
error #0: dial tcp 127.0.0.1:4001: connect: connection refused
error #1: EOF
Command
docker container ls | grep k8s_POD_etcd
Response
k8s_POD_etcd-<nodename>_kube-system_<docker container id>
Command
docker exec -it k8s_POD_etcd-<nodename>_kube-system_<docker container id> etcdctl --endpoints=https://<node ip>:2379 --key=/etc/kubernetes/pki/etcd/peer.key --cert=/etc/kubernetes/pki/etcd/peer.crt --cacert=/etc/kubernetes/pki/etcd/ca.crt member list
Response
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"etcdctl\": executable file not found in $PATH": unknown
EDIT
Upgraded to v3.2 etcdctl API
Command
etcdctl endpoint status
Response
Failed to get the status of endpoint 127.0.0.1:2379 (context deadline exceeded)