Calico CNI - calico-kube-controllers 无法初始化 Calico 数据存储错误

问题描述

我在 Kubernetes 版本 v3.19.1 上运行 Calico CNI v1.19.13。该集群使用 CentOS Steam 8 和 RHEL 8 操作系统,具有 3 个主节点和 3 个节点。

calico-kube-controller 在工作节点上启动时。它因 [FATAL][1] main.go 118: Failed to initialize Calico datastore 错误消息而失败。

我在部署 calico 时使用了以下设置

    # Auto-detect the BGP IP address.
    - name: IP
      value: "autodetect"
    - name: IP_AUTODETECTION_METHOD
      value: "interface=en.*"
    - name: Felix_IPTABLESBACKEND
      value: "NFT"

Pod 启动期间的错误消息:

 klf calico-kube-controllers-5978c5f6b5-bxbmw
2021-07-26 15:24:21.353 [INFO][1] main.go 92: Loaded configuration from environment config=&config.Config{LogLevel:"info",WorkloadEndpointWorkers:1,ProfileWorkers:1,PolicyWorkers:1,NodeWorkers:1,Kubeconfig:"",DatastoreType:"kubernetes"}
W0726 15:24:21.356093       1 client_config.go:615] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
2021-07-26 15:24:21.357 [INFO][1] main.go 113: Ensuring Calico datastore is initialized
2021-07-26 15:24:31.357 [ERROR][1] client.go 261: Error getting cluster information config Clusterinformation="default" error=Get "https://10.96.0.1:443/apis/crd.projectcalico.org/v1/clusterinformations/default": context deadline exceeded
2021-07-26 15:24:31.357 [FATAL][1] main.go 118: Failed to initialize Calico datastore error=Get "https://10.96.0.1:443/apis/crd.projectcalico.org/v1/clusterinformations/default": context deadline exceeded

解决错误消息的任何提示

谢谢 SR

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)