Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Kubernetes PersistentVolume, PersistentVolumeClaim, volume using hostPath

pv.yaml

kind: PersistentVolume
apiVersion: v1
metadata:
  name: hostpath
  labels:
    type: local
spec:
  storageClassName: manual
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/tmp/devopsschool"

$ kubectl create -f pv.yaml
$ kubectl get pv

pvc.yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pvchostpath
spec:
  storageClassName: manual
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi

$ kubectl create -f pvc.yaml
$ kubectl get pvc

pod.yaml

kind: Pod
apiVersion: v1
metadata:
  name: task-pv-pod
spec:
  containers:
    - name: task-pv-container
      image: scmgalaxy/nginx-devopsschoolv1
      ports:
        - containerPort: 80
          name: "http-server"
      volumeMounts:
        - mountPath: "/usr/share/nginx/html"
          name: task-pv-storage
  volumes:
    - name: task-pv-storage
      persistentVolumeClaim:
        claimName: pvchostpath

$ kubectl create -f pod.yaml
$ kubectl get pods -o wide
$ vi /tmp/devopsschool/index.html
$ curl http://ip-add

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.