Files
Steve Perry ee08d90cb3 Write new Task: Communicating Between Containers Running in the Same … (#2077)
* Write new Task: Communicating Between Containers Running in the Same Pod.
2017-01-05 14:42:34 -08:00

28 lines
499 B
YAML

apiVersion: v1
kind: Pod
metadata:
name: two-containers
spec:
restartPolicy: Never
volumes:
- name: shared-data
emptyDir: {}
containers:
- name: nginx-container
image: nginx
volumeMounts:
- name: shared-data
mountPath: /usr/share/nginx/html
- name: debian-container
image: debian
volumeMounts:
- name: shared-data
mountPath: /pod-data
command: ["/bin/sh"]
args: ["-c", "echo Hello from the debian container > /pod-data/index.html"]