繁体   English   中英

KubeletNotReady - 无法初始化 CSINodeInfo

[英]KubeletNotReady - Failed to initialize CSINodeInfo

在 Ubunutu 18.04 中安装 Kubernetes 集群时出现以下错误。 Kubernetes 主节点已准备就绪。 我正在使用法兰绒作为 pod 网络。 我将使用 join 命令将我的第一个节点添加到集群中。

  Type             Status  LastHeartbeatTime                 LastTransitionTime                Reason                       Message
  ----             ------  -----------------                 ------------------                ------                       -------
  MemoryPressure   False   Wed, 11 Dec 2019 05:43:02 +0000   Wed, 11 Dec 2019 05:38:47 +0000   KubeletHasSufficientMemory   kubelet has sufficient memory available
  DiskPressure     False   Wed, 11 Dec 2019 05:43:02 +0000   Wed, 11 Dec 2019 05:38:47 +0000   KubeletHasNoDiskPressure     kubelet has no disk pressure
  PIDPressure      False   Wed, 11 Dec 2019 05:43:02 +0000   Wed, 11 Dec 2019 05:38:47 +0000   KubeletHasSufficientPID      kubelet has sufficient PID available
  Ready            False   Wed, 11 Dec 2019 05:43:02 +0000   Wed, 11 Dec 2019 05:38:47 +0000   KubeletNotReady              Failed to initialize CSINodeInfo: error updating CSINode annotation: timed out waiting for the condition; caused by: the server could not find the requested resource

更新:

我在下面的工作节点中注意到

    root@worker02:~# systemctl status kubelet
● kubelet.service - kubelet: The Kubernetes Node Agent
   Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/kubelet.service.d
           └─10-kubeadm.conf
   Active: active (running) since Wed 2019-12-11 06:47:41 UTC; 27s ago
     Docs: https://kubernetes.io/docs/home/
 Main PID: 14247 (kubelet)
    Tasks: 14 (limit: 2295)
   CGroup: /system.slice/kubelet.service
           └─14247 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --cgroup-driv

Dec 11 06:47:43 worker02 kubelet[14247]: I1211 06:47:43.085292   14247 reconciler.go:209] operationExecutor.VerifyControllerAttachedVolume started for volume "flannel-cfg" (UniqueName: "kuber
Dec 11 06:47:43 worker02 kubelet[14247]: I1211 06:47:43.086115   14247 reconciler.go:209] operationExecutor.VerifyControllerAttachedVolume started for volume "flannel-token-nbss2" (UniqueName
Dec 11 06:47:43 worker02 kubelet[14247]: I1211 06:47:43.087975   14247 reconciler.go:209] operationExecutor.VerifyControllerAttachedVolume started for volume "kube-proxy" (UniqueName: "kubern
Dec 11 06:47:43 worker02 kubelet[14247]: I1211 06:47:43.088104   14247 reconciler.go:209] operationExecutor.VerifyControllerAttachedVolume started for volume "xtables-lock" (UniqueName: "kube
Dec 11 06:47:43 worker02 kubelet[14247]: I1211 06:47:43.088153   14247 reconciler.go:156] Reconciler: start to sync state
Dec 11 06:47:45 worker02 kubelet[14247]: E1211 06:47:45.130889   14247 csi_plugin.go:267] Failed to initialize CSINodeInfo: error updating CSINode annotation: timed out waiting for the condit
Dec 11 06:47:48 worker02 kubelet[14247]: E1211 06:47:48.134042   14247 csi_plugin.go:267] Failed to initialize CSINodeInfo: error updating CSINode annotation: timed out waiting for the condit
Dec 11 06:47:50 worker02 kubelet[14247]: E1211 06:47:50.538096   14247 csi_plugin.go:267] Failed to initialize CSINodeInfo: error updating CSINode annotation: timed out waiting for the condit
Dec 11 06:47:53 worker02 kubelet[14247]: E1211 06:47:53.131425   14247 csi_plugin.go:267] Failed to initialize CSINodeInfo: error updating CSINode annotation: timed out waiting for the condit
Dec 11 06:47:56 worker02 kubelet[14247]: E1211 06:47:56.840529   14247 csi_plugin.go:267] Failed to initialize CSINodeInfo: error updating CSINode annotation: timed out waiting for the condit

请让我知道如何解决这个问题?

我有同样的问题,但是,我的情况是我有一个正在运行的 k8s 集群,突然,CISNodeInfo 问题发生在我的某些 k8s 节点上,并且该节点不再在集群中。 用google搜索了几天,终于得到了Node无法加入的答案#86094

只需编辑 /var/lib/kubelet/config.yaml 即可添加:

featureGates:
  CSIMigration: false

...在文件末尾似乎允许集群按预期启动。

安装 Kubernetes 的链接

此链接仅适用于具有 1 个主节点的 1 个集群。 如果要添加工作节点。 您需要在主节点的 /etc/hosts 文件中指定您的 IP 和机器名称。 然后设置你的 kubernetes master。 一旦启动。 然后将您的工作节点加入主节点。 确保在工作节点中安装 kubectl 和 docker。 如果您只希望 master 管理 kubernetes 集群,请跳过共享链接的第 26 步。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM