add examples

Signed-off-by: Huamin Chen <hchen@redhat.com>
This commit is contained in:
Huamin Chen 2018-01-18 20:12:10 +00:00
parent 57a4715e95
commit 84adf568a8
3 changed files with 40 additions and 0 deletions

17
examples/pod.yaml Normal file
View File

@ -0,0 +1,17 @@
apiVersion: v1
kind: Pod
metadata:
name: web-server
spec:
containers:
- name: web-server
image: nginx
volumeMounts:
- mountPath: /var/lib/www/html
name: mypvc
volumes:
- name: mypvc
persistentVolumeClaim:
claimName: rbd-pv
readOnly: false

11
examples/pvc.yaml Normal file
View File

@ -0,0 +1,11 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: rbd-pv
spec:
accessModes:
- ReadWriteOnce
storageClassName: rbd-csi-provisioner
resources:
requests:
storage: 1Mi

12
examples/sc.yaml Normal file
View File

@ -0,0 +1,12 @@
apiVersion: storage.k8s.io/v1beta1
kind: StorageClass
metadata:
name: rbd-csi-provisioner
provisioner: csi-rbd
parameters:
monitors: 172.24.0.6:6789
pool: rbd
adminID: admin
adminSecret: AQAmsGBap4EoBhAAET/Hc7fBqAZj/cy7cDcoQA==
userID: kube
userSecret: AQAMgXhVwBCeDhAA9nlPaFyfUSatGD4drFWDvQ==