kubeasz/manifests/storage/test.yaml

36 lines
643 B
YAML
Raw Normal View History

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
2018-07-28 10:21:34 +08:00
name: test-claim
spec:
2018-07-28 10:21:34 +08:00
storageClassName: nfs-dynamic-class-01
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Mi
---
kind: Pod
apiVersion: v1
metadata:
name: test
spec:
containers:
- name: test
image: busybox
2018-06-22 18:01:43 +08:00
imagePullPolicy: IfNotPresent
command:
- "/bin/sh"
args:
- "-c"
2018-07-28 10:21:34 +08:00
- "echo 'hello k8s' > /mnt/SUCCESS && sleep 36000 || exit 1"
volumeMounts:
- name: nfs-pvc
mountPath: "/mnt"
restartPolicy: "Never"
volumes:
- name: nfs-pvc
persistentVolumeClaim:
2018-07-28 10:21:34 +08:00
claimName: test-claim