@@ -74,8 +74,9 @@ kubectl get StorageClasses
7474Expected output:
7575
7676``` shell
77- NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
78- gp2 (default) kubernetes.io/aws-ebs Delete WaitForFirstConsumer false 54m
77+ NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
78+ gp2 kubernetes.io/aws-ebs Delete WaitForFirstConsumer false 3h43m
79+ gp3 ebs.csi.aws.com Delete WaitForFirstConsumer false 3h29m
7980```
8081
8182We see that we indeed have a ` StorageClass ` available and ready for use!
@@ -127,8 +128,9 @@ Next we fill in the values:
127128- The ` apiVersion` should be `v1`
128129- The `kind` is `PersistentVolumeClaim`
129130- The `metadata.name` should be `postgres-pvc`
130- - From the previous section we know that we have one available `StorageClass`, so the value of
131- ` spec.storageClassName` is the name of that, in this case `"gp2"` (with quotes)
131+ - From the previous section we know that we have one two `StorageClass` available, so we should
132+ choose one of them. "gp3" is faster and cheaper than "gp2" in AWS, so let's go with that by
133+ setting `spec.storageClassName` to `"gp3"` (with quotes)
132134- The `spec.accessModes` list should contain one item with the value `ReadWriteOnce`
133135- the `spec.resources.requests.storage` is the size of the volume in Gibibytes (Gi), set it to `5Gi`
134136
@@ -141,7 +143,7 @@ kind: PersistentVolumeClaim
141143metadata:
142144 name: postgres-pvc
143145spec:
144- storageClassName: "gp2 "
146+ storageClassName: "gp3 "
145147 accessModes:
146148 - ReadWriteOnce
147149 resources:
@@ -173,7 +175,7 @@ Expected output:
173175
174176` ` ` text
175177NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
176- postgres-pvc Pending gp2 3m19s
178+ postgres-pvc Pending gp3 3m19s
177179` ` `
178180
179181Check if a `PersistentVolume` was created using `kubectl get` :
@@ -332,7 +334,7 @@ Expected output:
332334
333335` ` ` text
334336NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE
335- persistentvolumeclaim/postgres-pvc Bound pvc-60e5235b-e2bb-4d71-9136-3901ca4dece9 5Gi RWO gp2 <unset> 3m55s
337+ persistentvolumeclaim/postgres-pvc Bound pvc-60e5235b-e2bb-4d71-9136-3901ca4dece9 5Gi RWO gp3 <unset> 3m55s
336338
337339NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS VOLUMEATTRIBUTESCLASS REASON AGE
338340persistentvolume/pvc-00e46d16-c3a8-4b4c-8ccd-aaef24970f01 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-7 gp3 <unset> 8d
@@ -356,7 +358,7 @@ persistentvolume/pvc-24ea8c05-8bdb-485b-8541-3eb67d2de012 25Gi RWO
356358persistentvolume/pvc-2a99943d-b33a-4e70-bedf-c76a4470dde1 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-84 gp3 <unset> 8d
357359persistentvolume/pvc-2cb0beda-b70a-4801-b1b2-2cb05d851837 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-62 gp3 <unset> 8d
358360persistentvolume/pvc-2ee41664-c2f7-46ac-a509-23dd905fb548 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-24 gp3 <unset> 8d
359- persistentvolume/pvc-3068b592-6f5c-40af-8f66-2f954e591bcf 5Gi RWO Delete Bound student-76/postgres-pvc gp2 <unset> 5m53s
361+ persistentvolume/pvc-3068b592-6f5c-40af-8f66-2f954e591bcf 5Gi RWO Delete Bound student-76/postgres-pvc gp3 <unset> 5m53s
360362persistentvolume/pvc-33c97802-67b5-483b-a8e8-d80884ec1196 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-29 gp3 <unset> 8d
361363persistentvolume/pvc-3535a091-be7f-449b-8989-d148b70852d7 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-67 gp3 <unset> 8d
362364persistentvolume/pvc-3792c72a-695a-4d68-9027-180963099f30 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-46 gp3 <unset> 8d
@@ -371,11 +373,11 @@ persistentvolume/pvc-4ef28400-5fe4-414f-bde4-4ad7bf85f67f 25Gi RWO
371373persistentvolume/pvc-503543a6-2605-4774-852a-b5a113cc53f5 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-15 gp3 <unset> 8d
372374persistentvolume/pvc-50391d8c-aecb-4846-bfa3-d7fef0d3b2fd 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-52 gp3 <unset> 8d
373375persistentvolume/pvc-574f3e6a-d7fd-4aad-a883-060b3a96d020 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-50 gp3 <unset> 8d
374- persistentvolume/pvc-5a245381-a2bc-4eb5-ba57-2da4c3b369c8 5Gi RWO Delete Bound default/postgres-pvc gp2 <unset> 8d
376+ persistentvolume/pvc-5a245381-a2bc-4eb5-ba57-2da4c3b369c8 5Gi RWO Delete Bound default/postgres-pvc gp3 <unset> 8d
375377persistentvolume/pvc-5b78be48-effc-43a7-b97d-315647117934 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-25 gp3 <unset> 8d
376378persistentvolume/pvc-5cfac69b-2987-41e9-a31d-64977c114be6 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-23 gp3 <unset> 8d
377379persistentvolume/pvc-60a6bab6-d141-46c5-a5d9-ce4180cb0a67 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-57 gp3 <unset> 8d
378- persistentvolume/pvc-60e5235b-e2bb-4d71-9136-3901ca4dece9 5Gi RWO Delete Bound student-19/postgres-pvc gp2 <unset> 14s
380+ persistentvolume/pvc-60e5235b-e2bb-4d71-9136-3901ca4dece9 5Gi RWO Delete Bound student-19/postgres-pvc gp3 <unset> 14s
379381persistentvolume/pvc-626158a5-6acc-41f3-a2f4-7d613dd426dd 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-79 gp3 <unset> 8d
380382persistentvolume/pvc-6499594c-af86-4b63-bc01-5f5c886db94b 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-78 gp3 <unset> 8d
381383persistentvolume/pvc-66056829-2e5d-49eb-be99-119ee33aa3cd 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-27 gp3 <unset> 8d
@@ -404,7 +406,7 @@ persistentvolume/pvc-9454a68d-153a-4d80-a170-0bb45d61dce6 25Gi RWO
404406persistentvolume/pvc-94ede42f-75cc-45d6-9f84-63b5f9c4978e 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-54 gp3 <unset> 8d
405407persistentvolume/pvc-9b24acf2-80c1-4b05-add5-753d268513ab 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-1 gp3 <unset> 8d
406408persistentvolume/pvc-9cf3f0c5-935b-4a9a-bd60-7eacdfeb186a 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-16 gp3 <unset> 8d
407- persistentvolume/pvc-a5f6d728-026d-48f9-b7ef-c7e49eea3199 5Gi RWO Delete Bound student-44/postgres-pvc gp2 <unset> 9s
409+ persistentvolume/pvc-a5f6d728-026d-48f9-b7ef-c7e49eea3199 5Gi RWO Delete Bound student-44/postgres-pvc gp3 <unset> 9s
408410persistentvolume/pvc-aa995fa4-7c0b-4bd4-bf67-7745f739b6b4 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-47 gp3 <unset> 8d
409411persistentvolume/pvc-abf09c27-03e0-4b6a-8454-48e435f71f6e 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-19 gp3 <unset> 8d
410412persistentvolume/pvc-af5efa42-db08-416d-af61-e92354570d52 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-43 gp3 <unset> 8d
@@ -423,9 +425,9 @@ persistentvolume/pvc-e30cbac1-00e3-4d2a-a4c8-d7bf67069592 25Gi RWO
423425persistentvolume/pvc-e37b322a-1a60-48ce-ab7c-f110989801e7 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-30 gp3 <unset> 8d
424426persistentvolume/pvc-e3d0e01b-09c4-4ebf-b150-e2ef72ec7d46 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-49 gp3 <unset> 8d
425427persistentvolume/pvc-e85c0f94-e1d3-4234-9eb8-19541fa9d38f 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-33 gp3 <unset> 8d
426- persistentvolume/pvc-f2ad2087-120d-417b-aa53-26b0fe41d416 5Gi RWO Delete Bound student-0/postgres-pvc gp2 <unset> 6h17m
428+ persistentvolume/pvc-f2ad2087-120d-417b-aa53-26b0fe41d416 5Gi RWO Delete Bound student-0/postgres-pvc gp3 <unset> 6h17m
427429persistentvolume/pvc-fa0dca95-bf4a-437b-9112-ad6b5ec7dacd 25Gi RWO Delete Bound code-server-workstations/coder-home-workstation-80 gp3 <unset> 8d
428- persistentvolume/pvc-fc17f2e1-c7bc-4a43-8e3d-956dbedb0e97 8Gi RWO Delete Bound monitoring/prometheus-server gp2 <unset> 8d
430+ persistentvolume/pvc-fc17f2e1-c7bc-4a43-8e3d-956dbedb0e97 8Gi RWO Delete Bound monitoring/prometheus-server gp3 <unset> 8d
429431` ` `
430432
431433# ## Delete pod with volume attached and observe that state is persisted when a new pod is created
0 commit comments