Last active
June 20, 2016 22:01
-
-
Save bprashanth/e811187c9f9839d8809b569a74315466 to your computer and use it in GitHub Desktop.
simple pv
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
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: test | |
spec: | |
capacity: | |
storage: 200Gi | |
accessModes: | |
- ReadWriteOnce | |
gcePersistentDisk: | |
# this pd must exist | |
# gcloud compute disks create test-disk | |
pdName: test-disk | |
fsType: ext4 | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: test | |
spec: | |
accessModes: [ "ReadWriteOnce" ] | |
resources: | |
requests: | |
storage: 200Gi | |
--- | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
generateName: test- | |
spec: | |
terminationGracePeriodSeconds: 0 | |
containers: | |
- name: busybox | |
image: busybox | |
command: | |
- sh | |
- -c | |
- touch /data/`hostname`; while true; do sleep 3600; done | |
volumeMounts: | |
- name: data | |
mountPath: /data | |
volumes: | |
- name: data | |
persistentVolumeClaim: | |
claimName: test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment