Kubernetes the hard way

why do i keep getting this error when bootstrapping etcd in the kubernetes the hard way lesson
vagrant@master-2:~$ sudo ETCDCTL_API=3 etcdctl member list
–endpoints=https://127.0.0.1:2379
–cacert=/etc/etcd/ca.crt
–cert=/etc/etcd/etcd-server.crt
–key=/etc/etcd/etcd-server.key
{“level”:“warn”,“ts”:“2023-08-22T01:54:52.901Z”,“logger”:“etcd-client”,“caller”:“v3/retry_interceptor.go:62”,“msg”:“retrying of unary invoker failed”,“target”:“etcd-endpoints://0xc00035ac40/127.0.0.1:2379”,“attempt”:0,“error”:“rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:2379: connect: connection refused"”}
Error: context deadline exceeded

sudo ETCDCTL_API=3 etcdctl member list
–endpoints=https://127.0.0.1:2379
–cacert=/etc/etcd/ca.crt
–cert=/etc/etcd/etcd-server.crt
–key=/etc/etcd/etcd-server.key
{“level”:“warn”,“ts”:“2023-08-22T01:54:58.911Z”,“logger”:“etcd-client”,“caller”:“v3/retry_interceptor.go:62”,“msg”:“retrying of unary invoker failed”,“target”:“etcd-endpoints://0xc0003c6c40/127.0.0.1:2379”,“attempt”:0,“error”:“rpc error: code = DeadlineExceeded desc = context deadline exceeded”}
Error: context deadline exceeded

Looks to me like etcd process is not running, therefore you have probably made a mistake during the installation of it.

Some things to try

  1. Check if it is actually installed
    sudo systemctl cat etcd
    
  2. If so, is it running?
    sudo systemctl status etcd
    
  3. Try starting it
    sudo systemctl start etcd
    
    then recheck the status
  4. If it still didn’t start, then why?
    sudo journalctl -u etcd
    

Either way, with KTHW, if you’ve made a mistake in an earlier lab, you will often have to reset it all and start over. Nobody said it’s easy. Clue’s in the name :wink:

Can someone help i am unable to ssh into my nodes
[email protected]: Permission denied (publickey)