Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Persistent Volume Claim 실습

Info
iconfalse
Code Block
linenumberstrue
sansae@sansaeAir15m2 k8s-lab-workspace % k get pv
No resources found
sansae@sansaeAir15m2 k8s-lab-workspace % k get pvc
No resources found in default namespace.

sansae@sansaeAir15m2 k8s-lab-workspace % k apply -f pvc.yaml 
persistentvolumeclaim/foo-pvc created
sansae@sansaeAir15m2 k8s-lab-workspace % k get pvc
NAME      STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
foo-pvc   Bound    pvc-735e1382-f1e1-40f3-8378-25e72ebda4b0   1Gi        RWO            azurefile      3s
sansae@sansaeAir15m2 k8s-lab-workspace % k get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM             STORAGECLASS   REASON   AGE
pvc-735e1382-f1e1-40f3-8378-25e72ebda4b0   1Gi        RWO            Delete           Bound    default/foo-pvc   azurefile               5s
sansae@sansaeAir15m2 k8s-lab-workspace % 

Code Block
titlestatefulset.yaml
linenumberstrue
collapsetrue
sansae@sansaeAir15m2 k8s-lab-workspace % k apply -f statefulset.yaml 
service/nginx-stps created
statefulset.apps/web created

sansae@sansaeAir15m2 k8s-lab-workspace % k get pvc
NAME        STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
www-web-0   Bound    pvc-d7a6b825-edeb-4f06-813f-eef6abe19398   1Gi        RWO            azurefile      52s
www-web-1   Bound    pvc-a2ebaeef-ae82-47bc-8988-6bb6ca0a9067   1Gi        RWO            azurefile      32s
www-web-2   Bound    pvc-e17e5080-4403-4131-9d2b-f143431681df   1Gi        RWO            azurefile      12s

sansae@sansaeAir15m2 k8s-lab-workspace % k get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM               STORAGECLASS   REASON   AGE
pvc-a2ebaeef-ae82-47bc-8988-6bb6ca0a9067   1Gi        RWO            Delete           Bound    default/www-web-1   azurefile               55s
pvc-d7a6b825-edeb-4f06-813f-eef6abe19398   1Gi        RWO            Delete           Bound    default/www-web-0   azurefile               74s
pvc-e17e5080-4403-4131-9d2b-f143431681df   1Gi        RWO            Delete           Bound    default/www-web-2   azurefile               34s


...