问题概述
启动systemctl start kubelet.service服务后,在日志中出现如下错误消息:
Aug 27 11:09:20 node1 kubelet[1188]: E0827 11:09:20.083185 1188 azure_dd.go:147] failed to get azure cloud in GetVolumeLimits, plugin.host: node1 Aug 27 11:09:30 node1 kubelet[1188]: E0827 11:09:30.108157 1188 azure_dd.go:147] failed to get azure cloud in GetVolumeLimits, plugin.host: node1 Aug 27 11:09:40 node1 kubelet[1188]: E0827 11:09:40.122239 1188 azure_dd.go:147] failed to get azure cloud in GetVolumeLimits, plugin.host: node1
大概五秒钟一次,本文将介绍如何处理该错误。
系统环境
操作系统: | CentOS Linux release 7.4.1708 (Core) |
Kubernetes: | v1.12.1 |
问题原因
报错的是AttachVolumeLimit插件,这个插件用于报告可以附加到节点的卷数限制,因为Google,Amazon,Microsoft等云商通常对可以连接到节点的卷数量进行限制。 对于Kubernetes来说,反映这些限制很重要。否则,调度到节点上的Pod可能会因为等待卷挂载而卡住。
但是,我们是自己部署的集群,没有云商的限制,所有可以禁用它。
解决办法
修改/etc/sysconfig/kubelet配置文件,添加--feature-gates=AttachVolumeLimit=false选项。
参考文献
K8S_v1.12.1提示failed to get azure cloud in GetVolumeLimits, plugin.host: master
Error message: “failed to get azure cloud in GetVolumeLimits” in bare-metal setup after upgrade to 1.12.1 #69503
resize2fs: Bad magic number in super-block while trying to open