Add wordpress example for demonstrating variable reference

This commit is contained in:
Jingfang Liu
2018-06-08 11:25:19 -07:00
parent 900ac005dd
commit 1f8e56a210
10 changed files with 152 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: wordpress
spec:
template:
spec:
initContainers:
- name: init-command
image: debian
command:
- "echo $(WORDPRESS_SERVICE)"
- "echo $(MYSQL_SERVICE)"
containers:
- name: wordpress
env:
- name: WORDPRESS_DB_HOST
value: mysql
- name: WORDPRESS_DB_PASSWORD
valueFrom:
secretKeyRef:
name: mysql-pass
key: password