Expose Service in Kubernetes using Ingress

11/24/2019

I am new to Kubernetes. I have deployed a Node API in my local machine with the help of minikube. Below is the nodejs service: enter image description here

Spec in node-service.yaml

spec:
 type: NodePort
 ports:
  - name: "8000"
    port: 8000
    targetPort: 8000

Even tried with LoadBalancer, no luck. I have created a basic ingress using the below file:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: basic-ingress
spec:
  rules:
    - http:
        paths:
          - path: /
            backend:
              serviceName: nodejs
              servicePort: 8000

But I am unable to expose this service. enter image description here

ADDRESS is not bound. Please suggest a possible solution that works on my local machine. If there is any other solution to expose my api over http please point me to a resource where I can get more information about it.

GitHub Link: Basic Node Mongo Kubernetes Setup

-- Abhilash D K
kubernetes
minikube

1 Answer

11/30/2019

Based in the documentation I enabled ingress on my minikube cluster by running the command minikube addons enable ingress. This solved my issue.

-- Abhilash D K
Source: StackOverflow