Kubernetes Storage Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 22: Line 22:
=Local Volumes=
=Local Volumes=


==Create a Local Volume and a Persistent Volume Claim that Binds to It==
==Create a Local Volume, the corresponding Persistent Volume and a Persistent Volume Claim that Binds to It==


This is the step-by-step procedure to create a [[Kubernetes_Storage_Concepts#Persistent_Volume_.28PV.29|persistent volume]] backed by a [[Kubernetes_Storage_Concepts#local|local volume]] and expose it to a pod with a matching [[Kubernetes_Storage_Concepts#Persistent_Volume_Claim_.28PVC.29|persistent volume claim]].
This is the step-by-step procedure to create a [[Kubernetes_Storage_Concepts#Persistent_Volume_.28PV.29|persistent volume]] backed by a [[Kubernetes_Storage_Concepts#local|local volume]] and expose it to a pod with a matching [[Kubernetes_Storage_Concepts#Persistent_Volume_Claim_.28PVC.29|persistent volume claim]].

Revision as of 02:32, 12 December 2019

Internal

Get Information about Persistent Volumes

kubectl get pv <pv-name>
kubectl describe pv <pv-name>

Get Information about Persistent Volumes Claims

kubectl get pvc <pvc-name>
kubectl describe pvc <pvc-name>

Get Information about Storage Classes

NFS volume Example

This is an example to setup and use an nfs volume.

TODO: https://github.com/kubernetes/examples/tree/master/staging/volumes/nfs

Local Volumes

Create a Local Volume, the corresponding Persistent Volume and a Persistent Volume Claim that Binds to It

This is the step-by-step procedure to create a persistent volume backed by a local volume and expose it to a pod with a matching persistent volume claim.

Expose a Local Disk

In this context, "exposing a local disk" means exposing a raw block device. TODO.

Expose a Local Directory