title: Running simple hello world static http app in Kubernetes
body: <p>I have a simple Hello World app on Dockerhub and I'm trying to run it in Kubernetes but no luck, nothing shows up.</p>
  
  <p>Dockerfile: </p>
  
  <pre><code>FROM centos:7
  
  RUN  yum install httpd -y
  
  RUN echo "Hello World" &gt; /var/www/html/index.html
  
  RUN chown -R apache:apache /var/www/html
  
  EXPOSE 80
  
  CMD  [ "/usr/sbin/httpd", "-D", "FOREGROUND" ]
  </code></pre>
  
  <p>Kubernetes YAML: </p>
  
  <pre><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: ingress-test
    labels:
      app: hello-world
  spec:
    replicas: 1
    selector:
      matchLabels:
        app: hello-world
    template:
      metadata:
        labels:
          app: hello-world
      spec:
        containers:
        - name: helloworld
          image: 56789/world:v1
          ports:
          - containerPort: 80
  ---
  apiVersion: v1
  kind: Service
  metadata:
    name: hello-world
  spec:
    selector:
      app: hello-world
    ports:
    - protocol: "TCP"
      port: 80
      targetPort: 80
    type: LoadBalancer
  </code></pre>