title: Docker image doesn't start in kubernetes
body: <p>I'm trying to figure out how the docker command <code>docker run -p 8080:80 webapp</code> to kubernetes yaml. I have a nginx dockerized and the image works fine when I start it with the command mentioned above. When I push it to kubernetes, nothing happens. </p>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM nginx:1.13.3-alpine
  
  COPY nginx/default.conf /etc/nginx/conf.d/
  
  RUN rm -rf /usr/share/nginx/html/*
  
  COPY ./dist /usr/share/nginx/html
  
  CMD ["nginx", "-g", "daemon off;"]
  </code></pre>
  
  <p>My Kubernetes deployment</p>
  
  <pre><code>kind: Deployment
  apiVersion: extensions/v1beta1
  metadata:
    name: webapp-production
  spec:
    replicas: 1
    template:
      metadata:
        name: webapp
        labels:
          app: webapp
          role: frontend
          env: production
      spec:
        containers:
        - name: webapp
          image: eu.gcr.io/projectxyz/webapp:1.0.0
          env:
          - name: NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: ENVIRONMENT
            value: "production"
          resources:
            limits:
              memory: "500Mi"
              cpu: "100m"
          imagePullPolicy: Always
          ports:
          - name: webapp
            containerPort: 8080
  </code></pre>
  
  <p>My Service</p>
  
  <pre><code>kind: Service
  apiVersion: v1
  metadata:
    name: webapp
  spec:
    selector:
      app: webapp
      role: frontend
    type: NodePort
    ports:
    - name: http
      port: 8080
    - name: external
      port: 80
      targetPort: 8080
  </code></pre>
  
  <p>Do I have to run a command in kubernetes? Are the ports configured correct? Thanks for the help.</p>
  
  <p>/////// Edit /////
  Message from pod logs: <code>The selected container has not logged any messages yet.</code></p>