Welcome to the Linux Foundation Forum!

Lab 4.1, Step 5- broken LaTeX

Options

In the pdf for Lab 4.1, Step 5, the command to view the status of the cluster is incomplete, resulting in a "broken" Step 6. due to LaTeX being confused about the quotes. This seems like the right place to send a bug report of this sort... I suspect the command is supposed to end with something like '...etcdctl endpoint status -w table'

The step appears as follows, with visible LaTeX commands:

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 --endpoints=https://127.0.0.1:2379 \ \begin{response} +----------------------------+------------------+---------+---------+-----------+---- --------+-----------+------------+--------------------+--------+ | ENDPOINT | ID | VERSION | DB SIZE | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS | +----------------------------+------------------+---------+---------+-----------+---- --------+-----------+------------+--------------------+--------+ | https://10.128.15.193:2379 | 4ef398947c14d552 | 3.4.9 | 4.2 MB | true | false | 2 | 2315318 | 2315318 | | +----------------------------+------------------+---------+---------+-----------+---- --------+-----------+------------+--------------------+--------+ \end{response} \item Now that we know how many etcd databases are in the cluster, and their health, we can back it up. Use the \verb?snapshot? argument to save the snapshot into the container data directory\file{/var/lib/etcd/} \begin{cmd} 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 --endpoints=https://127.0.0.1:2379 \ snapshot save /var/lib/etcd/snapshot.db "

Comments

  • chrispokorni
    chrispokorni Posts: 2,165
    Options

    Hi @jecoulte,

    This issues has been reported and solutioned in an earlier post, where you can find the full command:

    https://forum.linuxfoundation.org/discussion/858063/lab-4-1-etcd-db-backup-issues#latest

    Regards,
    -Chris

  • vishwas2f4u
    vishwas2f4u Posts: 4
    edited March 2021
    Options

    Labs 4.1 - In step 3, the comment in command says to "pass the peer cert and key" but I see server.crt being passed in, can anyone please help me understand this?

    student@master:˜$ kubectl -n kube-system exec -it etcd-master -- sh \ #Same as before
    -c "ETCDCTL_API=3 \ #Version to use
    ETCDCTL_CACERT=/etc/kubernetes/pki/etcd/ca.crt \ # Pass the certificate authority
    ETCDCTL_CERT=/etc/kubernetes/pki/etcd/server.crt \ #Pass the peer cert and key
    ETCDCTL_KEY=/etc/kubernetes/pki/etcd/server.key \
    etcdctl endpoint health" #The command to test the endpoint
    1 https://127.0.0.1:2379 is healthy: successfully committed proposal

  • chrispokorni
    chrispokorni Posts: 2,165
    Options

    Hi @vishwas2f4u,

    You can pass either the server.crt together with server.key, or pass the peer.crt together with peer.key instead.

    Regards,
    -Chris

Categories

Upcoming Training