Calico etcd has no key named calico

9/4/2018

I have a 2 node kubernetes cluster with calico networking. All the pods are up and running.

NAMESPACE     NAME                                       READY     STATUS    RESTARTS   AGE

kube-system   calico-etcd-94466                          1/1       Running   0          21h
kube-system   calico-kube-controllers-5fdcfdbdf7-xsjxb   1/1       Running   0          14d
kube-system   calico-node-hmnf5                          2/2       Running   0          14d
kube-system   calico-node-vmmmk                          2/2       Running   0          14d
kube-system   coredns-78fcdf6894-dlqg6                   1/1       Running   0          14d
kube-system   coredns-78fcdf6894-zwrd6                   1/1       Running   0          14d
kube-system   etcd-kube-master-01                        1/1       Running   0          14d
kube-system   kube-apiserver-kube-master-01              1/1       Running   0          14d
kube-system   kube-controller-manager-kube-master-01     1/1       Running   0          14d
kube-system   kube-proxy-nxfht                           1/1       Running   0          14d
kube-system   kube-proxy-qnn45                           1/1       Running   0          14d
kube-system   kube-scheduler-kube-master-01              1/1       Running   0          14d

I wanted to query calico-etcd using etcdctl, but I get the following error.

# etcdctl --debug --endpoints "http://10.142.137.11:6666" get calico
start to sync cluster using endpoints(http://10.142.137.11:6666)
cURL Command: curl -X GET http://10.142.137.11:6666/v2/members
got endpoints(http://10.142.137.11:6666) after sync
Cluster-Endpoints: http://10.142.137.11:6666
cURL Command: curl -X GET http://10.142.137.11:6666/v2/keys/calico?quorum=false&recursive=false&sorted=false
Error:  100: Key not found (/calico) [4]

Any pointers on why I get this error?

-- Pradeep
etcd
kubernetes
project-calico

1 Answer

9/5/2018

As @JakubBujny mentioned, ETCDCTL_API=3 should be set to get the appropriate result.

-- Akar
Source: StackOverflow