I’m trying to follow the instructions on the git hub instructions on installing kubernetes the hardway step 7. I’d put the link in but this forum software is preventing me.
I’ve been following up to step 7 and am attempting to validate my etcd
1761bef04e125165, started, master-1, https://192.168.56.11:2380, https://192.168.56.11:2379, false
d60f170a453bcaf4, started, master-2, https://192.168.56.12:2380, https://192.168.56.12:2379, false
I’m not sure if the false at the end is telling me that my 2379 is not working or neither is working. It looks like my etcd services are running.
It also looks like these instructions might be out of date. Any tips on troubleshooting. It seems the instructions between the github and the video are out of date. Everything seemed to be working until that point.
Mumshad’s version of the repo is actually fairly well maintained; the last update was about 3 months ago (it’s February 2024 as I write this).
The label on the can pretty much sums it up:
Please note that with this particular challenge, it is all about the minute detail. If you miss one tiny step anywhere along the way, it’s going to break!
Note also that in developing this lab, it has been tested many many times! Once you have the VMs up and you start to build the cluster, if at any point something isn’t working it is 99.9999% likely to be because you missed something, not a bug in the lab!
It sounds like you might have etcd working, since you probably ran this command, which would demonstrate that the server is responding:
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
rob,
Thanks for the response. Okay, I’ll prioritize the repo over the video when they don’t exactly match.
I did run that command but my output doesn’t match the output in the repo.
I have an extra word that says, ‘false’ at the end. Not sure what to make of it.
the etcd service is running and that output says its started. I think the output below means that my ports 2380 on master 1 and 2 are running but my 2379 are not.
1761bef04e125165, started, master-1, https://192.168.56.11:2380, https://192.168.56.11:2379, false
d60f170a453bcaf4, started, master-2, https://192.168.56.12:2380, https://192.168.56.12:2379, false
Echo $understanding
$ ‘I totally understand this’, ‘false’
Apparently that false at the end is about whether the node ‘is learner’ - it’s probably the case that things are working.
At this point, k8s is all mysterious goat sacrifices and CLI ritual. Soon the clouds will clear I hope.
A friend found:
Blockquote
etcdctl member list --help
NAME:
member list - Lists all members in the cluster
USAGE:
etcdctl member list [flags]
DESCRIPTION:
When --write-out is set to simple, this command prints out comma-separated member lists for each endpoint.
The items in the lists are ID, Status, Name, Peer Addrs, Client Addrs, Is Learner.
As you can see from above the last column is for `Is Learner` which is false for all of your nodes. ETCD version 3.4 introduces a new node state “Learner”, which joins the cluster as a non-voting member until it catches up to leader’s logs. This means the learner still receives all updates from leader, while it does not count towards the quorum, which is used by the leader to evaluate peer activeness. The learner only serves as a standby node until promoted. This relaxed requirements for quorum provides the better availability during membership reconfiguration and operational safety.
So your ETCD cluster is in good state. To verify leader is there or not use below command
sudo ETCDCTL_API=3 etcdctl endpoint status --write-out=table --endpoints=https://10.240.0.10:2379 --cacert=/etc/etcd/ca.pem --cert=/etc/etcd/kubernetes.pem --key=/etc/etcd/kubernetes-key.pem
±------------------------±-----------------±--------±--------±----------±-----------±----------±-----------±-------------------±-------+
| ENDPOINT | ID | VERSION | DB SIZE | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS |
±------------------------±-----------------±--------±--------±----------±-----------±----------±-----------±-------------------±-------+
| https://172.16.2.3:2379 | f15c8d27ccf66395 | 3.4.3 | 2.2 MB | false | false | 6 | 41219 | 41219 | |
| https://172.16.2.6:2379 | be8c6e0b5f5f6157 | 3.4.3 | 2.2 MB | true | false | 6 | 41219 | 41219 | |
| https://172.16.2.7:2379 | 7e7a0308e6c2067f | 3.4.3 | 2.2 MB | false | false | 6 | 41219 | 41219 | |
±------------------------±-----------------±--------±--------±----------±-----------±----------±-----------±-------------------±-------+
Blockquote
That, or I suppose WE WILL RUN OUT OF GOATS