Skip to content

Instantly share code, notes, and snippets.

@sombrafam
Created August 24, 2020 15:07
Show Gist options
  • Save sombrafam/a790a751a07e03e98107fe006944cf06 to your computer and use it in GitHub Desktop.
Save sombrafam/a790a751a07e03e98107fe006944cf06 to your computer and use it in GitHub Desktop.
ubuntu@sombrafam-bastion:~/stsstack-bundles/kubernetes$ kubectl create -f - <<EOY
> kind: PersistentVolumeClaim
> apiVersion: v1
> metadata:
> name: testclaim$(date +%s)
> spec:
> accessModes:
> - ReadWriteOnce
> resources:
> requests:
> storage: 100Mi
> storageClassName: vmwarelocal
> EOY
persistentvolumeclaim/testclaim1598281591 created
ubuntu@sombrafam-bastion:~/stsstack-bundles/kubernetes$ kc get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
vmwarelocal kubernetes.io/vsphere-volume Delete Immediate false 17s
ubuntu@sombrafam-bastion:~/stsstack-bundles/kubernetes$ kc get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
testclaim1598281591 Bound pvc-34dfce0f-000c-4687-9c28-5a840a50ab7e 100Mi RWO vmwarelocal 12s
ubuntu@sombrafam-bastion:~/stsstack-bundles/kubernetes$ kc describe pvc
Name: testclaim1598281591
Namespace: default
StorageClass: vmwarelocal
Status: Bound
Volume: pvc-34dfce0f-000c-4687-9c28-5a840a50ab7e
Labels: <none>
Annotations: pv.kubernetes.io/bind-completed: yes
pv.kubernetes.io/bound-by-controller: yes
volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/vsphere-volume
Finalizers: [kubernetes.io/pvc-protection]
Capacity: 100Mi
Access Modes: RWO
VolumeMode: Filesystem
Mounted By: <none>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ProvisioningSucceeded 22s persistentvolume-controller Successfully provisioned volume pvc-34dfce0f-000c-4687-9c28-5a840a50ab7e using kubernetes.io/vsphere-volume
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment