Created
September 7, 2022 14:50
-
-
Save alperen-selcuk/f9b60d9ff09362c14880f2ce987de880 to your computer and use it in GitHub Desktop.
cka questions pv-pvc
This file contains hidden or 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
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: my-pv | |
spec: | |
capacity: | |
storage: 2Gi | |
volumeMode: Filesystem | |
accessModes: | |
- ReadWriteOnce | |
persistentVolumeReclaimPolicy: Recycle | |
storageClassName: slow | |
hostPath: | |
path: /data/config | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: my-pvc | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
volumeMode: Filesystem | |
resources: | |
requests: | |
storage: 2Gi | |
storageClassName: slow | |
--- | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: mypod | |
spec: | |
containers: | |
- name: web | |
image: nginx | |
volumeMounts: | |
- mountPath: "/var/www/html" | |
name: mypd | |
volumes: | |
- name: mypd | |
persistentVolumeClaim: | |
claimName: my-pvc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment