Write new task: Configuring Pod Initialization.

This commit is contained in:
steveperry-53
2017-01-03 10:14:46 -08:00
committed by steveperry-53
parent 0d9e5069b2
commit 205a3007a8
3 changed files with 124 additions and 0 deletions
@@ -0,0 +1,32 @@
apiVersion: v1
kind: Pod
metadata:
name: init-demo
annotations:
pod.beta.kubernetes.io/init-containers: '[
{
"name": "install",
"image": "busybox",
"command": ["wget", "-O", "/work-dir/index.html", "http://kubernetes.io"],
"volumeMounts": [
{
"name": "workdir",
"mountPath": "/work-dir"
}
]
}
]'
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
volumeMounts:
- name: workdir
mountPath: /usr/share/nginx/html
dnsPolicy: Default
volumes:
- name: workdir
emptyDir: {}