Last active
November 16, 2022 09:50
-
-
Save jenting/1aad904f5de3e64b0e95301634c1537f to your computer and use it in GitHub Desktop.
PreExisting Volume
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: Pod | |
metadata: | |
name: workspace-pod-test | |
namespace: default | |
spec: | |
restartPolicy: Always | |
containers: | |
- name: volume-pv-test | |
image: nginx:stable-alpine | |
imagePullPolicy: IfNotPresent | |
livenessProbe: | |
exec: | |
command: | |
- ls | |
- /data/lost+found | |
initialDelaySeconds: 5 | |
periodSeconds: 5 | |
volumeMounts: | |
- name: vol | |
mountPath: /data | |
ports: | |
- containerPort: 80 | |
volumes: | |
- name: vol | |
persistentVolumeClaim: | |
claimName: pre-existing-pvc-0 |
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: pre-existing-pv-0 | |
spec: | |
storageClassName: "" | |
capacity: | |
storage: 30Gi | |
volumeMode: Filesystem | |
accessModes: | |
- ReadWriteOnce | |
persistentVolumeReclaimPolicy: Retain | |
nodeAffinity: | |
required: | |
nodeSelectorTerms: | |
- matchExpressions: | |
- key: topology.gke.io/zone | |
operator: In | |
values: | |
- us-west1-a | |
csi: | |
driver: pd.csi.storage.gke.io | |
fsType: ext4 | |
volumeHandle: "projects/workspace-clusters/zones/us-west1-a/disks/test-disk" |
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: PersistentVolumeClaim | |
metadata: | |
name: pre-existing-pvc-0 | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 30Gi | |
volumeName: pre-existing-pv-0 | |
storageClassName: "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment