November 2017
Intermediate to advanced
388 pages
8h 46m
English
PersistentVolumeClaim is an abstraction over the actual storage system in our cluster. With a claim, we define that we need some amount of storage at some path inside our container. Based on our needs, the cluster management system will provision us some storage out of its available storage pool. In case of AWS, we usually get an EBS volume attached to the node and mounted into our container.
Now, let’s create a persistent volume claim template k8s-pvc.yaml to create volume using the EBS storage. Post that, let's check the status of volume:
$ vi k8s-pvc.yamlkind: PersistentVolumeClaimapiVersion: v1metadata: name: k8s-pvc labels: type: amazonEBSspec: accessModes: - ReadWriteOnce resources: requests: storage: ...
Read now
Unlock full access