Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubernetes-volumes - re-work example output #139

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions content/docs/kubernetes/kubernetes-volumes.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A [cluster running on Civo](./create-a-cluster.md) will have `civo-volume` as th
kubectl get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
local-path rancher.io/local-path Delete WaitForFirstConsumer false 10m
civo-volume (default) csi.civo.com Delete Immediate false 10m
civo-volume (default) csi.civo.com Delete WaitForFirstConsumer false 10m
```

## Creating a Persistent Volume Claim (PVC)
Expand Down Expand Up @@ -49,13 +49,9 @@ $ kubectl create -f pvc.yaml
persistentvolumeclaim/civo-volume-test created
```

This will have created the PersistentVolume and claim:
This will have created the PersistentVolumeClaim:

```console
$ kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-11509930-bf05-49ec-8814-62744e4606c4 3Gi RWO Delete Bound default/civo-volume-test civo-volume 2s

$ kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
civo-volume-test Bound pvc-11509930-bf05-49ec-8814-62744e4606c4 3Gi RWO civo-volume 13m
Expand Down Expand Up @@ -97,6 +93,14 @@ NAME READY STATUS RESTARTS AGE
civo-vol-test-pod 1/1 Running 0 54s
```

And the associated volume, specified in the claim:

```console
$ kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-11509930-bf05-49ec-8814-62744e4606c4 3Gi RWO Delete Bound default/civo-volume-test civo-volume 2s
```

## Cordoning and deleting a node to show persistence

If you cordon the node and delete the pod from above, you should be able to re-create it and have it spin up on a different node but attached to the pre-defined persistent volume.
Expand Down