33 lines
689 B
YAML
33 lines
689 B
YAML
|
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: {}
|
||
|
|