[root@master ~]# kubectl get storageclass
NAME              PROVISIONER        RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local (default)   openebs.io/local   Delete          WaitForFirstConsumer   false                  20m
nas               nfs-nas            Retain          Immediate              false                  101s
[root@master ~]# kubectl patch storageclass local -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
storageclass.storage.k8s.io/local patched
[root@master ~]# kubectl patch storageclass local -p '{"metadata": {"annotations":{"storageclass.beta.kubernetes.io/is-default-class":"false"}}}'
storageclass.storage.k8s.io/local patched
[root@master ~]# kubectl patch storageclass nas -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
storageclass.storage.k8s.io/nas patched
[root@master ~]# kubectl get storageclass
NAME            PROVISIONER        RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local           openebs.io/local   Delete          WaitForFirstConsumer   false                  23m
nas (default)   nfs-nas            Retain          Immediate              false                  5m5s

发表回复

您的电子邮箱地址不会被公开。

Captcha Code