Projects:Kubernetes: verschil tussen versies

Naar navigatie springen Naar zoeken springen
224 bytes toegevoegd ,  27 mrt 2019
Regel 337: Regel 337:


To more accurately implement this use-case, Kubernetes has two object types called [https://kubernetes.io/docs/concepts/storage/persistent-volumes/ PersistentVolume and PersistentVolumeClaim]. The idea is that a cluster administrator creates PersistentVolumes (abbreviated <code>pv</code>) that know what kind of storage they represent and where to find it; then, users create PersistentVolumeClaim (abbreviated <code>pvc</code>) asking for storage with constraints like "at least 10 GB". When a PVC is created, it is matched to its closest PV and a link is created. If no PV is available to fulfill a PVC, the PVC stays in "Pending" state. In a way, PersistentVolumes are like Nodes in the sense that they provide capacity, and PersistentVolumeClaims are like Pods in the sense that they use that capacity if it is available anywhere in the cluster.
To more accurately implement this use-case, Kubernetes has two object types called [https://kubernetes.io/docs/concepts/storage/persistent-volumes/ PersistentVolume and PersistentVolumeClaim]. The idea is that a cluster administrator creates PersistentVolumes (abbreviated <code>pv</code>) that know what kind of storage they represent and where to find it; then, users create PersistentVolumeClaim (abbreviated <code>pvc</code>) asking for storage with constraints like "at least 10 GB". When a PVC is created, it is matched to its closest PV and a link is created. If no PV is available to fulfill a PVC, the PVC stays in "Pending" state. In a way, PersistentVolumes are like Nodes in the sense that they provide capacity, and PersistentVolumeClaims are like Pods in the sense that they use that capacity if it is available anywhere in the cluster.
In this section, we'll rewrite our Pod from before to use a PersistentVolumeClaim with its constraints, and then have that PersistentVolumeClaim automatically matched to a PersistentVolume that provides the same NFS share.


== Running a Deployment using this volume ==
== Running a Deployment using this volume ==

Navigatiemenu