簡體   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