Merge 769a63cf0d into eda51e93a9
This commit is contained in:
commit
9abeb57edc
17
pod-secret-as-var.yaml
Normal file
17
pod-secret-as-var.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: mymysql
|
||||
spec:
|
||||
containers:
|
||||
- name: famke-mysql
|
||||
image: busybox
|
||||
command:
|
||||
- sleep
|
||||
- "3600"
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mysql
|
||||
key: password
|
||||
18
pod-secret.yaml
Normal file
18
pod-secret.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: secretbox2
|
||||
spec:
|
||||
containers:
|
||||
- name: secretbox
|
||||
image: busybox
|
||||
command:
|
||||
- sleep
|
||||
- "3600"
|
||||
volumeMounts:
|
||||
- name: secret
|
||||
mountPath: /secretstuff
|
||||
volumes:
|
||||
- name: secret
|
||||
secret:
|
||||
secretName: secretstuff
|
||||
13
pv.yaml
Normal file
13
pv.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: pv-volume
|
||||
labels:
|
||||
type: local
|
||||
spec:
|
||||
capacity:
|
||||
storage: 2Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
hostPath:
|
||||
path: "/mydata"
|
||||
25
shared-volume.yaml
Normal file
25
shared-volume.yaml
Normal file
@ -0,0 +1,25 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: sharedvolume
|
||||
spec:
|
||||
containers:
|
||||
- image: centos:7
|
||||
name: centos1
|
||||
command:
|
||||
- sleep
|
||||
- "3600"
|
||||
volumeMounts:
|
||||
- mountPath: /centos1
|
||||
name: test
|
||||
- image: centos:7
|
||||
name: centos2
|
||||
command:
|
||||
- sleep
|
||||
- "3600"
|
||||
volumeMounts:
|
||||
- mountPath: /centos2
|
||||
name: test
|
||||
volumes:
|
||||
- name: test
|
||||
emptyDir: {}
|
||||
Loading…
Reference in New Issue
Block a user