阿里云ack更改存储类型nas为默认类型
今天在k8s上部署gitlab,由于是helm chart方式部署,StorageClass示例文件上没有说明如何更改StorageClass类型,只是说明了,如果不填写StorageClass 类型,将会是默认的存储类型。
·
今天在k8s上部署gitlab,由于是helm chart方式部署,StorageClass示例文件上没有说明如何更改StorageClass类型,只是说明了,如果不填写StorageClass 类型,将会是默认的存储类型。
如何查看k8s上的存储类型
本人环境是阿里云ack
$ kubectl get storageclass
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
alibabacloud-cnfs-nas nasplugin.csi.alibabacloud.com Delete Immediate true 171d
alicloud-disk-available diskplugin.csi.alibabacloud.com Delete Immediate true 171d
alicloud-disk-efficiency diskplugin.csi.alibabacloud.com Delete Immediate true 171d
alicloud-disk-essd diskplugin.csi.alibabacloud.com Delete Immediate true 171d
alicloud-disk-ssd diskplugin.csi.alibabacloud.com Delete Immediate true 171d
alicloud-disk-topology diskplugin.csi.alibabacloud.com Delete WaitForFirstConsumer true 171d
# ALLOWVOLUMEEXPANSION字段表示是否可以扩展卷,就是pv
修改k8s上的默认存储类型
# 取消默认存储 只要把他的值改为false即可
$ kubectl patch storageclass alibabacloud-cnfs-nas -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
验证默认存储类型
$ kubectl get storageclass
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
alibabacloud-cnfs-nas (default) nasplugin.csi.alibabacloud.com Delete Immediate true 171d
alicloud-disk-available diskplugin.csi.alibabacloud.com Delete Immediate true 171d
alicloud-disk-efficiency diskplugin.csi.alibabacloud.com Delete Immediate true 171d
alicloud-disk-essd diskplugin.csi.alibabacloud.com Delete Immediate true 171d
alicloud-disk-ssd diskplugin.csi.alibabacloud.com Delete Immediate true 171d
alicloud-disk-topology diskplugin.csi.alibabacloud.com Delete WaitForFirstConsumer true 171d
更多推荐
已为社区贡献16条内容
所有评论(0)