Kubernetes 1.17にしたら起動しなくなった時

Kubernetesのパッケージを一部ホールド(apt-mark hold)し忘れて1.17にアップグレードしちゃいました。そしたら、Nodeが起動しなくなっちゃいました。

$ kubectl get node
NAME      STATUS     ROLES    AGE   VERSION
testvm1   NotReady   master   46d   v1.17.0

kubectl describeでノードの状態を調べると以下のようなログが出てました。

$ kubectl describe node testvm1
略
 Failed to initialize CSINodeInfo: error updating CSINode annotation:  timed out waiting for the condition; caused by: the server could not  find the requested resource 

調べると、1.17から追加 CSIMigration という機能が原因とのことで、これを無効にする設定を追加します。

CSIMigration: シムと変換ロジックを有効にしてボリューム操作をKubernetesリポジトリー内のプラグインから対応した事前インストール済みのCSIプラグインにルーティングします。

Kubernetesリファレンス https://kubernetes.io/ja/docs/reference/command-line-tools-reference/feature-gates/
$ sudo vi /var/lib/kubelet/config.yaml
featureGates:         ←追加
  CSIMigration: false ←追加

その後、systemctl restart kubelet.service すれば起動しました。kubeadm upgrade node を実行するとconfig.yamlを上書きしちゃうので要注意です。

$ sudo systemctl restart kubelet.service
略
$ kubectl get node
NAME      STATUS     ROLES    AGE   VERSION
testvm1   Ready      master   46d   v1.17.0

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です