kubernetes-hands-on/16-sidecar-containers/01-sidecar.yml

23 lines
491 B
YAML
Raw Normal View History

2019-05-14 22:04:12 +06:00
---
2019-05-14 21:56:47 +06:00
apiVersion: v1
kind: Pod
metadata:
name: two-containers
spec:
volumes:
2019-05-14 22:04:12 +06:00
- name: shared-data
emptyDir: {}
2019-05-14 21:56:47 +06:00
containers:
2019-05-14 22:04:12 +06:00
- name: nginx
image: nginx
volumeMounts:
2019-05-23 15:13:32 +06:00
- name: shared-data
2019-05-14 22:04:12 +06:00
mountPath: /usr/share/nginx/html
- name: debian
image: debian
volumeMounts:
2019-05-23 15:13:32 +06:00
- name: shared-data
2019-05-14 22:04:12 +06:00
mountPath: /pod-data
command: ["/bin/sh"]
args: ["-c", "echo Hello from the debian container > /pod-data/index.html"]