website/docs/user-guide/nginx-init-containers.yaml

32 lines
695 B
YAML
Raw Normal View History

2016-06-16 21:05:50 +00:00
apiVersion: v1
kind: Pod
metadata:
name: nginx
annotations:
pod.beta.kubernetes.io/init-containers: '[
2016-06-16 21:05:50 +00:00
{
"name": "install",
"image": "busybox",
"command": ["wget", "-O", "/work-dir/index.html", "http://kubernetes.io/index.html"],
"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: {}