Skip to content

Commit

Permalink
feat: ✨ Persistent Volume: Claim
Browse files Browse the repository at this point in the history
A Persistent Volume Claim (PVC) is a Kubernetes resource that allows users to request and consume storage from available Persistent Volumes in the cluster, providing an abstraction layer and efficient storage management for containerized applications.
  • Loading branch information
kevencript committed Mar 21, 2023
1 parent 130a44d commit 615e356
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ spec:
volumeMounts:
- mountPath: "/go/myfamily"
name: file-injection
- mountPath: "/go/persistence"
name: persistent-volume
volumes:
- name: persistent-volume
persistentVolumeClaim:
claimName: default-pvc
- name: file-injection
configMap:
name: configmap-app-injection
Expand Down
11 changes: 11 additions & 0 deletions k8s/persistent-volume-claim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: default-pvc
spec:
resources:
requests:
storage: 3Gi
#volumeMode: Filesystem
accessModes:
- ReadWriteOnce

0 comments on commit 615e356

Please sign in to comment.