I am creating a pod with two containers, this is my yaml, but when I created it . . .

Edith Puclla:
I am creating a pod with two containers, this is my yaml, but when I created it is created just one of them, there aren’t error, what I am doing wrong? :thinking_face:

Rocky:
Did you wait enough ?

vikas mahajan:
Name of the second container should should come inside container

Rocky:
syntax must be right otherwise pod wont get created.

vikas mahajan:
Container:

  • name: first
    Image: first
  • name: second
    Image: second

unnivkn:
https://kubernetes.io/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/

Edith Puclla:
wuaaaaaaaaaaa right, do you have reason
Sorry guys…

unnivkn:
np… :+1:

Rocky:
Should this be a bug ?

Shwetha Shenoy V:
@Edith Puclla: The second containers configuration overwrites the first one. Thats why you saw no errors and only the second spec was applied. Same is true for any other field in the yaml definition. :slightly_smiling_face:

Shwetha Shenoy V:
You will experience a lot when you get to the securityContexts. Trust me. :innocent:

Edith Puclla:
Great now is perfect! , thank you a lot guys :pray::heart:

unnivkn:
good learning