title: Dual nginx in one Kubernetes pod
body: <p>I am doing a lab about <em>kubernetes</em> in <em>google cloud</em>, so my task is deploy two <em>nginx</em> servers in one pod, however I have a issue.</p>
  
  <p>One of the pods can not starts, as PORT or IP is using buy another nginx container, I need to change it in yaml file, please give me a solution, thank you in advance</p>
  
  <pre><code>apiVersion: v1
  kind: Pod
  metadata:
    name: two-containers
  spec:
  
    restartPolicy: Never
  
    volumes:
    - name: shared-data
      emptyDir: {}
  
    containers:
  
    - name: first-container
      image: nginx
    - name: second-container
      image: nginx
  
  E  nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
  
  E  2019/01/21 11:04:47 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
  
  E  nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
  
  E  2019/01/21 11:04:47 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
  
  E  nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
  
  E  2019/01/21 11:04:47 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
  
  E  nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
  
  E  2019/01/21 11:04:47 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
  
  E  nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
  
  E  2019/01/21 11:04:47 [emerg] 1#1: still could not bind()
  
  E  nginx: [emerg] still could not bind()
  </code></pre>