Welcome to the Linux Foundation Forum!

Determine how many databases are part of the cluster.

hi
in Exercise 4.1: Basic Node Maintenance
i face a problem in step 4 >>> when i use this command
kubectl -n kube-system exec -it etcd-master -- sh -c \
"ETCDCTL_API=3 etcdctl --cert=./peer.crt --key=./peer.key --cacert=./ca.crt \
--endpoints=https://127.0.0.1:2379 member list"

return Error >>> Error: open ./peer.crt: no such file or directory
command terminated with exit code 128

what is the problem ??

Comments

  • serewicz
    serewicz Posts: 1,000

    Hello,

    The command uses a relative path for the command. Thus ./peer.crt would cause the bash shell to look in the current working directory for the file. If peer.crt is not in the current directory you will get the error you received. When you type pwd, do you see the file?

    Regards,

  • hhness
    hhness Posts: 18

    @serewicz
    I have the exact same problem.
    "
    student@master:/$ kubectl -n kube-system exec -it etcd-master -- sh -c "ETCDCTL_API=3 etcdctl --cert=./peer.crt --key=./peer.key --cacert=./ca.crt --endpoints=https://127.0.0.1:2379 member list"
    Error: open ./peer.crt: no such file or directory
    command terminated with exit code 128
    "
    when navigating to root i can not find the peer.crt file.
    "
    student@master:/$ pwd
    /
    "
    I also tried using find with no result.
    "
    student@master:/$ find peer.crt
    find: ‘peer.crt’: No such file or directory
    "
    I guess i have to generate the peer.crt file somehow?

  • chrispokorni
    chrispokorni Posts: 2,155

    Hi @hhness,

    There is another discussion thread presenting a solution to your issue:

    https://forum.linuxfoundation.org/discussion/comment/28492#Comment_28492

    Regards,
    -Chris

  • hhness
    hhness Posts: 18

    Thank you @chrispokorni
    That worked like a charm!

Categories

Upcoming Training