Welcome to the Linux Foundation Forum!

Check the health of the database using the loopback IP and port 2379 ( LAB 4-1 )

hi dears,
i want to start LAB 4-1 but in the first step i faced error when use this command >>>

student@master:˜$ kubectl -n kube-system exec -it etcd-master -- sh \
-c "ETCDCTL_API=3 \
ETCDCTL_CACERT=/etc/kubernetes/pki/etcd/ca.crt \
ETCDCTL_CERT=/etc/kubernetes/pki/etcd/server.crt \
ETCDCTL_KEY=/etc/kubernetes/pki/etcd/server.key \
etcdctl endpoint health"

ERROR >>
sh: : command not found
sh: line 1: : command not found
sh: line 2: : command not found
Error: KeyFile and CertFile must both be present[key: /etc/kubernetes/pki/etcd/server.key, cert: ]
command terminated with exit code 128

when i Log into the etcd container and check this command >> sh-5.0# etdctl endpoint health

Error >> {"level":"warn","ts":"2021-03-08T07:01:37.934Z","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-6568ae95-1d70-4822-8f7f-f8929c7b5b91/127.0.0.1:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: all SubConns are in TransientFailure, latest connection error: connection closed"}
127.0.0.1:2379 is unhealthy: failed to commit proposal: context deadline exceeded
Error: unhealthy cluster

what is this error and how could i solve it ??
i do everything from first and make master and worker node again but i got this error again.

Best Answer

  • Posts: 11
    Answer ✓

    i change the command to this >>
    ubuntu@master:~$ kubectl -n kube-system exec -it etcd-master -- sh -c "ETCDCTL_API=3 ETCDCTL_CACERT=/etc/kubernetes/pki/etcd/ca.crt ETCDCTL_CERT=/etc/kubernetes/pki/etcd/server.crt ETCDCTL_KEY=/etc/kubernetes/pki/etcd/server.key etcdctl endpoint health"
    and every thing OK.
    127.0.0.1:2379 is healthy: successfully committed proposal: took = 33.341174ms

Answers

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training