@@ -39,48 +39,60 @@ for details about addon manager and how to disable individual addons.
3939
40401 . List the StorageClasses in your cluster:
4141
42- kubectl get storageclass
42+ ``` bash
43+ kubectl get storageclass
44+ ```
4345
4446 The output is similar to this:
4547
46- NAME TYPE
47- standard (default) kubernetes.io/gce-pd
48- gold kubernetes.io/gce-pd
48+ ` ` ` bash
49+ NAME TYPE
50+ standard (default) kubernetes.io/gce-pd
51+ gold kubernetes.io/gce-pd
52+ ` ` `
4953
50- The default StorageClass is marked by ` (default) ` .
54+ The default StorageClass is marked by ` (default)` .
5155
52561. Mark the default StorageClass as non-default:
5357
54- The default StorageClass has an annotation
55- ` storageclass.kubernetes.io/is-default-class ` set to ` true ` . Any other value
56- or absence of the annotation is interpreted as ` false ` .
58+ The default StorageClass has an annotation
59+ ` storageclass.kubernetes.io/is-default-class` set to ` true` . Any other value
60+ or absence of the annotation is interpreted as ` false` .
5761
58- To mark a StorageClass as non-default, you need to change its value to ` false ` :
62+ To mark a StorageClass as non-default, you need to change its value to ` false` :
5963
60- kubectl patch storageclass <your-class-name> -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
64+ ` ` ` bash
65+ kubectl patch storageclass < your-class-name> -p ' {"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
66+ ` ` `
6167
62- where ` <your-class-name> ` is the name of your chosen StorageClass.
68+ where ` < your-class-name> ` is the name of your chosen StorageClass.
6369
64701. Mark a StorageClass as default:
6571
66- Similarly to the previous step, you need to add/set the annotation
67- ` storageclass.kubernetes.io/is-default-class=true ` .
72+ Similarly to the previous step, you need to add/set the annotation
73+ ` storageclass.kubernetes.io/is-default-class=true` .
6874
69- kubectl patch storageclass <your-class-name> -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
75+ ` ` ` bash
76+ kubectl patch storageclass < your-class-name> -p ' {"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
77+ ` ` `
7078
71- Please note that at most one StorageClass can be marked as default. If two
72- or more of them are marked as default, Kubernetes ignores the annotation,
73- i.e. it behaves as if there is no default StorageClass.
79+ Please note that at most one StorageClass can be marked as default. If two
80+ or more of them are marked as default, Kubernetes ignores the annotation,
81+ i.e. it behaves as if there is no default StorageClass.
7482
75831. Verify that your chosen StorageClass is default:
7684
77- kubectl get storageclass
85+ ` ` ` bash
86+ kubectl get storageclass
87+ ` ` `
7888
79- The output is similar to this:
89+ The output is similar to this:
8090
81- NAME TYPE
82- standard kubernetes.io/gce-pd
83- gold (default) kubernetes.io/gce-pd
91+ ` ` ` bash
92+ NAME TYPE
93+ standard kubernetes.io/gce-pd
94+ gold (default) kubernetes.io/gce-pd
95+ ` ` `
8496
8597{{% /capture %}}
8698
0 commit comments