apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pv-provisioning-test
labels:
test: pv-provisioning
annotations:
volume.alpha.kubernetes.io/storage-class: anything
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: ReplicationController
metadata:
name: gce-busybox
spec:
replicas: 1
selector:
name: gce-busybox
template:
metadata:
labels:
name: gce-busybox
spec:
containers:
- image: busybox
command:
- sh
- -c
- 'while true; do date > /mnt/index.html; hostname >> /mnt/index.html; tail -5 /mnt/index.html; echo sleeping; sleep $(($RANDOM % 5 + 5)); done'
imagePullPolicy: IfNotPresent
name: busybox
volumeMounts:
# name must match the volume name below
- name: pv
mountPath: "/mnt"
volumes:
- name: pv
persistentVolumeClaim:
claimName: pv-provisioning-test
Last active
April 1, 2016 23:59
-
-
Save bprashanth/4a3f6c3e4c77f4293569ba70b7032450 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment