Welcome to the Linux Foundation Forum!

Lab 4.1 Is etcd-k8scp supposed to work as an alias for the pod name?

ellainec
ellainec Posts: 1
edited January 9 in LFS258 Class Forum

Starting from Step 3 it refers to the etcd container as etcd-k8scp

[email protected]: ̃$ kubectl -n kube-system exec -it etcd-k8scp -- sh \ #Same as before-c "ETCDCTL_API=3 \ #Version to useETCDCTL_CACERT=/etc/kubernetes/pki/etcd/ca.crt \ #Pass the certificate authorityETCDCTL_CERT=/etc/kubernetes/pki/etcd/server.crt \ #Pass the peer cert and keyETCDCTL_KEY=/etc/kubernetes/pki/etcd/server.key \etcdctl endpoint health" #The command to test the endpoint

When I copy and paste this as is, I get the error:
Error from server (NotFound): pods "etcd-k8scp" not found
Which makes sense to me, since the actual pod itself is named "etcd-ip-ip address"
When I type the same command, but with the actual pod name (etcd-ip-ipaddress) it works.
Usually if we are supposed to replace something, it will mention it but I re-read the instructions and it makes no mention of it. I just want to make sure that I haven't missed anything. Is "etcd-k8scp" supposed to work as an alias? Did I miss a step?

Comments

  • chrispokorni
    chrispokorni Posts: 1,417

    Hi @ellainec,

    The naming of the etcd pod includes the name of the control-plane node where it runs. If an etcd pod runs on a control-plane node named cp-node-02 then the etcd pod will be named etcd-cp-node-02.

    Regards,
    -Chris

Categories

Upcoming Training