Created
July 10, 2016 05:32
-
-
Save solsson/a9ed6667ac0fc42500866b1b722227f8 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
--- | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: pv1 | |
labels: | |
id: test1 | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
capacity: | |
storage: 1Gi | |
hostPath: | |
path: /tmp/pv1 | |
--- | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: pv2 | |
labels: | |
id: test2 | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
capacity: | |
storage: 1Gi | |
hostPath: | |
path: /tmp/pv2 | |
--- | |
kind: PersistentVolumeClaim | |
apiVersion: v1 | |
metadata: | |
name: test | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 1Gi | |
selector: | |
matchLabels: | |
id: test2 | |
--- | |
kind: PersistentVolumeClaim | |
apiVersion: v1 | |
metadata: | |
name: testconflict | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 1Gi | |
selector: | |
matchLabels: | |
id: test2 | |
--- | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: volumetest1 | |
spec: | |
containers: | |
- image: gcr.io/google_containers/echoserver:1.4 | |
name: echo | |
volumeMounts: | |
- name: test | |
mountPath: /mnt | |
volumes: | |
- name: test | |
persistentVolumeClaim: | |
claimName: test | |
--- | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: volumetest1-conflict | |
spec: | |
containers: | |
- image: gcr.io/google_containers/echoserver:1.4 | |
name: echo | |
volumeMounts: | |
- name: test | |
mountPath: /mnt | |
volumes: | |
- name: test | |
persistentVolumeClaim: | |
claimName: testconflict |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment