我试图检查我的节点,以潜在地修复我的节点,但是命令"get“失败了。
错误是
Failed to create Calico API client... error parsing document: fields in document are not recognized or are in the wrong location: clusters, contexts, current-context, preferences, users还有其他方法可以“获取”我的节点吗?
更多信息:
我能够使用kubectl“获取”我的节点。
apiVersion: v1
kind: Node
metadata:
annotations:
kubeadm.alpha.kubernetes.io/cri-socket: /var/run/dockershim.sock
node.alpha.kubernetes.io/ttl: "0"
projectcalico.org/IPv4Address: 192.241.129.100/24
volumes.kubernetes.io/controller-managed-attach-detach: "true"
creationTimestamp: "2021-03-10T19:33:06Z"
labels:
beta.kubernetes.io/arch: amd64
beta.kubernetes.io/os: linux
kubernetes.io/arch: amd64
kubernetes.io/hostname: artemis
kubernetes.io/os: linux
node-role.kubernetes.io/control-plane: ""
node-role.kubernetes.io/master: ""
managedFields:
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:volumes.kubernetes.io/controller-managed-attach-detach: {}
f:labels:
.: {}
f:beta.kubernetes.io/arch: {}
f:beta.kubernetes.io/os: {}
f:kubernetes.io/arch: {}
f:kubernetes.io/hostname: {}
f:kubernetes.io/os: {}
f:status:
f:addresses:
.: {}
k:{"type":"Hostname"}:
.: {}
f:address: {}
f:type: {}
k:{"type":"InternalIP"}:
.: {}
f:address: {}
f:type: {}
f:allocatable:
.: {}
f:cpu: {}
...我有一个主节点和两个工作节点。所有的荚和节似乎是健康的。每个配对都能够平平其他两个节点,但每个节点在网络测试中都失败了。
calicoctl显示所有节点在从其他节点查看时都是"up“,但是命令"get”失败了。
Calico process is running.
IPv4 BGP status
+-----------------+-------------------+-------+------------+-------------+
| PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO |
+-----------------+-------------------+-------+------------+-------------+
| 143.198.57.235 | node-to-node mesh | up | 2021-03-10 | Established |
| 143.110.149.114 | node-to-node mesh | up | 2021-03-10 | Established |
+-----------------+-------------------+-------+------------+-------------+
IPv6 BGP status
No IPv6 peers found.发布于 2021-03-15 16:22:53
我一直在玩多个配置文件。而kubectl将识别多个配置文件进行测试,calicoctl则不会识别。我使用以下说明合并了我的配置文件:
How to merge kubectl config file with ~/.kube/config?
修好了!
https://stackoverflow.com/questions/66628938
复制相似问题