无法使用 calicoctl "get" 我的 calico 节点

Unable to "get" my calico node using calicoctl

我正在尝试检查我的节点以修复我的节点,但命令“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

还有其他方法可以在 calico 中“获取”我的节点吗?

更多信息:

我可以使用 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: {}
        ...

我有一个主节点和两个工作节点。所有 pods 和节点似乎都很健康。每个配对都能够 ping 通其他两个节点,但每个配对都在网络测试中失败。

当从其他节点查看时,calicoctl 显示所有节点都处于“启动”状态,但命令“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.

我一直在玩弄多个配置文件。 kubectl 会出于测试目的识别多个配置文件,而 calicoctl 不会。我使用此处的说明合并了我的配置文件:

How to merge kubectl config file with ~/.kube/config?

已修复!