Welcome to the Linux Foundation Forum!

LAB 4.1 Backing-up etcd

k0dard
k0dard Posts: 115
edited August 2022 in LFS258 Class Forum

Hello!
I was wondering if there's any practical difference between the following two commands:

kubectl -n kube-system exec -it etcd-k8s-cp -- 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 endpoint health"

and

kubectl -n kube-system exec -it etcd-k8s-cp –- sh -c "etcdctl \
--cacert=/etc/kubernetes/pki/etcd/ca.crt \
--cert=/etc/kubernetes/pki/etcd/server.crt \
--key=/etc/kubernetes/pki/etcd/server.key \
endpoint health"

The only thing I see is that with the 2nd command we cannot pass api version, but the command works fine without it. Is there any reason we should use env variables rather than etcdctl parameters?

Thanks in advance!

Comments

Categories

Upcoming Training