Update content/pt-br/examples/pods/two-container-pod.yaml
parent
9fb809baaa
commit
18b85cb10f
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: Communicate Between Containers in the Same Pod Using a Shared Volume
|
||||
title: Comunicação entre contêineres no mesmo pod usando um volume compartilhado
|
||||
content_type: task
|
||||
weight: 110
|
||||
---
|
||||
|
|
|
@ -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"]
|
Loading…
Reference in New Issue