Skip to main content
Version: 2.3

Create Persistence Volume Claims

Create a PVC

/assets/k8s/storage01.jpg

Create a new 100GB PVC

/assets/k8s/storage02.jpg

Save your PVC name

/assets/k8s/storage03.jpg

Mount PVC to pod

Create a New pod from Workload

/assets/k8s/storage04.jpg

/assets/k8s/storage05.jpg

apiVersion: v1
kind: Pod
metadata:
name: nignx-with-pvc
namespace: default
spec:
volumes:
- name: nginx-vol
persistentVolumeClaim:
claimName: bigstack-k8s-vol
containers:
- name: task-pv-container
image: nginx
ports:
- containerPort: 80
name: "http-server"
volumeMounts:
- mountPath: "/usr/share/nginx/html"
name: nginx-vol

Check the mount point

/assets/k8s/storage06.jpg /assets/k8s/storage07.jpg