Calico etcd 没有名为 calico 的键

Calico etcd has no key named calico

我有一个带有 calico 网络的 2 节点 kubernetes 集群。所有 pods 都已启动并且 运行。

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

我想使用 etcdctl 查询 calico-etcd,但出现以下错误。

# 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]

关于为什么会出现此错误的任何指示?

如@JakubBujny 所述,应设置 ETCDCTL_API=3 以获得适当的结果。