Write new Task: Communicating Between Containers Running in the Same … (#2077)

* Write new Task: Communicating Between Containers Running in the Same Pod.
This commit is contained in:
Steve Perry
2017-01-05 14:42:34 -08:00
committed by Phillip Wittrock
parent 3b6141b4d3
commit ee08d90cb3
3 changed files with 177 additions and 0 deletions
@@ -0,0 +1,27 @@
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"]