Update content/pt-br/examples/pods/two-container-pod.yaml

pull/38979/head
Ana Carolina Rodrigues 2023-01-18 16:23:18 -03:00
parent 9fb809baaa
commit 18b85cb10f
2 changed files with 28 additions and 1 deletions

View File

@ -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
---

View File

@ -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"]