I did a customized installation of Kubernetes the hardway and installed it successfully on a 2 node cluster in Hyper V (1 master 1 worker), everything works, but there's this thing that makes me scratch my head and I was wondering if anyone could give me insight about why it's happening.
etcdctl --help
Gives me the etcd v2 version of the help, and it also gives me the following Warning.
WARNING: Environment variable ETCDCTL_API is not set; defaults to etcdctl v2. Set environment variable ETCDCTL_API=3 to use v3 API or ETCDCTL_API=2 to use v2 API.
If I set the environment variable and run the command again, it's ignored:
ETCDCTL_API=3
etcdctl --help
But if I do
ETCDCTL_API=3 etcdctl --help
Then it gives me the etcd v3 version of the help, I also need to put ETCDCTL_API=3 in front of etcdctl snapshot save for it to be recognized as a valid command.
ETCDCTL_API=3 etcdctl snapshot save ~/etcd.backup \
--endpoints=https://127.0.0.1:2379 \
--cacert=/etc/etcd/ca.pem \
--cert=/etc/etcd/kubernetes.pem \
--key=/etc/etcd/kubernetes-key.pem
Why is this?