Changes

Jump to navigation Jump to search
m
Local persistent volumes
=== Local persistent volumes ===
These are persistent volumes which are mapped to special folders of the host filesystem of the node. Each node exposes several persistent volumes which can be claimed. The user can not control exactly which volume is bound to a claim, but can request a minimum size. A persistent volume claim (PVC) for a local PV is configured like this:
<syntaxhighlight lang="yaml">
> kubectl config useapiVersion: v1kind: PersistentVolumeClaimmetadata: # the name of the PVC, we refer to this in the container configuration name: tf-context me@ccumnist-pvc spec: resources: requests: # storage resource request. This PVC can only be bound to volumes which # have at least 8 GiB of storage available. storage: 8Gi  # the requested storage class, see tutorial. storageClassName: local-ssd  # leave these unchanged, they must match the PV type, otherwise binding will fail accessModes: - ReadWriteOnce volumeMode: Filesystem
</syntaxhighlight>
<syntaxhighlight lang="yaml">
> kubectl config useapply -context me@ccuf pvc.yml
</syntaxhighlight>
You can check on the status of the this (and every other) claim:
<syntaxhighlight lang="yaml">
> kubectl config useget pvcNAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGEtf-context me@ccumnist-pvc Pending local-ssd 11s
</syntaxhighlight>

Navigation menu