Abdullah Şamil Güser

Storage & Persistence

Volumes

Storage - Static Way

Reclaim Policy

Access Modes

Persistent Volume States

kubectl - Persistent Volume Cheat Sheet

# Deploy the PVs and PVCs
kubectl apply -f [definition.yaml]

# Get the PV list
kubectl get pv

# Get the PVC list
kubectl get pvc

# Describe the PV
kubectl describe pv [pvName]

# Describe the PVC
kubectl describe pvc [pvcName]

# Delete the PVs and PVCs
kubectl delete -f [definition.yaml]

# Delete the pv using its name
kubectl delete pv [pvName]

# Delete the pvc using its name
kubectl delete pvc [pvcName]

Storage - Dynamic Way

Storage Class

Reclaim Policy

Access Modes

kubectl - Storage Class Cheat Sheet

# Deploy the StorageClass or PVC
kubectl apply -f [definition.yaml]

# Get the StorageClass list
kubectl get sc

# Get the PVC list
kubectl get pvc

# Describe the StorageClass
kubectl describe sc [className]

# Delete the SC and PVC
kubectl delete -f [definition.yaml]

# Delete the SC using its name
kubectl delete sc [className]

# Delete the PVC using its name
kubectl delete pvc [pvcName]