Created
June 28, 2020 16:56
-
-
Save wuestkamp/b18c5cbce5200e1453d5ddc138c1feb2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PVC that uses the default storageclass | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: pvc-one | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 3Gi | |
--- | |
# pod that mounts volume | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: pod-one | |
spec: | |
volumes: | |
- name: vol | |
persistentVolumeClaim: | |
claimName: pvc-one | |
containers: | |
- image: nginx | |
name: pod-one | |
volumeMounts: | |
- name: vol | |
mountPath: /tmp/pvc-one | |
restartPolicy: Never |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment