title: Kubernetes - Ingress with Minikube
body: <p>I am learning kubernetes by playing with minikube.</p>
  
  <p>This is my pod deployment file which is fine.</p>
  
  <pre><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: my-deployment
  spec:
    replicas: 2
    selector:
      matchLabels:
        component: web
    template:
      metadata:
        labels:
          component: web
      spec:
        containers:
          - name: myapp
            image: myid/myimage
  </code></pre>
  
  <p>I am exposing the above pods using NodePort. I am able to access using minikube IP at port 30002.</p>
  
  <pre><code>apiVersion: v1
  kind: Service
  metadata:
    name: my-ip-service
  spec:
    type: NodePort
    externalIPs:
    - 192.168.99.100
    selector:
      component: web
    ports:
      - port: 3000
        nodePort: 30002
        targetPort: 8080
  </code></pre>
  
  <p>Now i would like to use ingress to access the application at port 80 which will forward the request the ip-service at port 3000. It does NOT work</p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: test-ingress
  spec:
    backend:
      serviceName: my-ip-service
      servicePort: 3000
  </code></pre>
  
  <p>If i try to access to ingress, address is blank. </p>
  
  <pre><code>NAME           HOSTS   ADDRESS   PORTS   AGE
  test-ingress   *                 80      41m
  </code></pre>
  
  <p>How to use ingress with minikube? Or how to bind the minikube ip with ingress service - so that the app can be exposed outside without using nodeport</p>