Skip to content

Commit d4dd396

Browse files
authored
Merge pull request #38940 from windsonsea/0105sce
Modify alignment of bullet items in 0105 blog
2 parents 5bd2354 + 96cab74 commit d4dd396

File tree

1 file changed

+30
-26
lines changed

1 file changed

+30
-26
lines changed

content/en/blog/_posts/2023-01-05-retroactive-default-storage-class.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -107,38 +107,42 @@ If you want to test the feature whilst it's alpha, you need to enable the releva
107107
If you would like to see the feature in action and verify it works fine in your cluster here's what you can try:
108108

109109
1. Define a basic PersistentVolumeClaim:
110-
```yaml
111-
apiVersion: v1
112-
kind: PersistentVolumeClaim
113-
metadata:
114-
name: pvc-1
115-
spec:
116-
accessModes:
117-
- ReadWriteOnce
118-
resources:
119-
requests:
120-
storage: 1Gi
121-
```
110+
111+
```yaml
112+
apiVersion: v1
113+
kind: PersistentVolumeClaim
114+
metadata:
115+
name: pvc-1
116+
spec:
117+
accessModes:
118+
- ReadWriteOnce
119+
resources:
120+
requests:
121+
storage: 1Gi
122+
```
122123
123124
2. Create the PersistentVolumeClaim when there is no default StorageClass. The PVC won't provision or bind (unless there is an existing, suitable PV already present) and will remain in <code>Pending</code> state.
124-
```
125-
$ kc get pvc
126-
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
127-
pvc-1 Pending
128-
```
125+
126+
```
127+
$ kc get pvc
128+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
129+
pvc-1 Pending
130+
```
129131

130132
3. Configure one StorageClass as default.
131-
```
132-
$ kc patch sc -p '{"metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
133-
storageclass.storage.k8s.io/my-storageclass patched
134-
```
133+
134+
```
135+
$ kc patch sc -p '{"metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
136+
storageclass.storage.k8s.io/my-storageclass patched
137+
```
135138

136139
4. Verify that PersistentVolumeClaims is now provisioned correctly and was updated retroactively with new default StorageClass.
137-
```
138-
$ kc get pvc
139-
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
140-
pvc-1 Bound pvc-06a964ca-f997-4780-8627-b5c3bf5a87d8 1Gi RWO my-storageclass 87m
141-
```
140+
141+
```
142+
$ kc get pvc
143+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
144+
pvc-1 Bound pvc-06a964ca-f997-4780-8627-b5c3bf5a87d8 1Gi RWO my-storageclass 87m
145+
```
142146

143147
### New metrics
144148

0 commit comments

Comments
 (0)