๐ŸŽฏ ืžื˜ืจืช ื”ืชืจื’ื•ืœ

ื‘ืฉืœื‘ ื”ื–ื”:

ืขื›ืฉื™ื• ื ืจืื”:


ื—ืœืง 1 โ€” ื™ืฆื™ืจืช Pod ืฉืžืฉืชืžืฉ ื‘-PVC

ื”ืžืจืฆื” ืžื“ื’ื™ืฉ:

ื”ืชื”ืœื™ืš ื–ื”ื” ืœ-emptyDir

ืื‘ืœ ื‘ืžืงื•ื emptyDir ื ืฉืชืžืฉ ื‘-persistentVolumeClaim

ื ื•ืกื™ืฃ ืœืงื•ื‘ืฅ:

---
apiVersion: v1
kind: Pod
metadata:
  name: local-volume-pod
spec:
  containers:
    - name: local-volume
      image: busybox:1.36.1

      # Keep container alive for testing
      command: ["sh", "-c", "sleep 3600"]

      volumeMounts:
        - name: local-volume
          mountPath: /mnt/local
          # This is where the PVC will be mounted inside the container

  volumes:
    - name: local-volume
      persistentVolumeClaim:
        claimName: local-volume-claim
        # This must match the PVC metadata.name
        # This connects the Pod to the PVC