现象:kubectl describe pvc 发现类型为 ProvisioningFailed 的事件,内容包含 no available storage in zone。
原因:资源售罄或者该 zone 不支持这种类型的 cbs 盘。
解决措施:用户可切换到有资源的 region/zone,或联系 cbs 售后提供资源。
2. disk is sold out
现象:cbs 插件报错 disk is sold out。
原因:cbs 磁盘售罄。
解决措施:联系 cbs 售后上架资源后重建 Pod。
3. InvalidParameter
现象1:pvc 一直处于 pending 状态,pv 无法被创建出来,插件报错 Key start with a word that is reserved for the system。
原因:cbs 插件在创建云硬盘时,会将集群的云标签集成到云硬盘上。而当云标签 key 中带有 qcloud. tencent 或 project 字段时,会导致云硬盘创建失败。
解决措施:修改相关集群云标签,避免在标签 key 中出现 qcloud. tencent 或 project 字段。
[TencentCloudSDKError]Code=InvalidParameter, Message=(16ab33025ebd)Key (tencentCloudPorject) start with a word that is reserved for the system
现象2:pvc 一直处于 pending 状态,pv 无法被创建出来,插件报错 tag value contains illegal characters。
原因:cbs 插件在创建云硬盘时,会将集群的云标签继承到云硬盘上。当云标签 value 为空值时,会导致云硬盘创建失败。
解决措施:修改相关集群云标签,避免将标签 value 配置为空。
[TencentCloudSDKError]Code=InvalidParameter, Message=(ec82d0f8807c)tag value contains illegal characters. Supports UTF-8-encoded characters, digits, spaces, and special characters (+-=._:/@()[]()【】),
4. disk size is invalid
现象: describe pvc 或查看插件日志可以看到报错 disk size is invalid。
原因:用户配置的 cbs 盘大小不符合规范导致买盘失败,不同类型的 cbs 盘,支持大小区间不同,具体查看 云硬盘类型文档。
解决措施:修改 pvc 容量大小,使其处于 cbs 支持区间范围内。
Output: mount: mounting /dev/vd* on /var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-***/globalmount failed: Invalid argument
原因:cbs 盘已格式化为 gpt 格式,无法通过 cbs 组件来挂载。
解决措施:将盘直接格式化为 ext4,或通过 pvc 新建未格式化的云盘,并将业务 pod 指向新建的 pvc。
4. 业务 Pod 启动时间较长
现象:挂载 cbs 的业务 Pod 启动时间较长,kubelet 包含如下日志。
Setting volume ownership for %s and fsGroup set. If the volume has a lot of files then setting volume ownership could be slow, see https://github.com/kubernetes/kubernetes/issues/69699