March 2020
Beginner
592 pages
14h 14m
English
In Chapter 5, Data Volumes and Configuration, we learned about volumes and their purpose: accessing and storing persistent data. Since containers can mount volumes, pods can do so as well. In reality, it is really the containers inside the pod that mount the volumes, but that is just a semantic detail. First, let's see how we can define a volume in Kubernetes. Kubernetes supports a plethora of volume types, so we won't delve into too much detail about this. Let's just create a local volume implicitly by defining a PersistentVolumeClaim called my-data-claim:
apiVersion: v1kind: PersistentVolumeClaimmetadata: name: my-data-claimspec: accessModes: - ReadWriteOnce resources: requests: storage: 2Gi
We have defined a claim that ...
Read now
Unlock full access