No ingress address on minikube Kubernetes cluster with nginx ingress controller

7/9/2018

I've got the following:

ingress.yaml

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: abcxyz
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
  - host: abcxyz
    http:
      paths:
      - path: /a/
        backend:
          serviceName: service-a
          servicePort: 80
      - path: /b/
        backend:
          serviceName: service-b
          servicePort: 80

Output of kubectl describe ingress abcxyz:

Name:             abcxyz
Namespace:        default
Address:          
Default backend:  default-http-backend:80 (<none>)
Rules:
  Host    Path  Backends
  ----    ----  --------
  abcxyz  
          /a/   service-a:80 (<none>)
          /b/   service-b:80 (<none>)
Annotations:
Events:
  Type    Reason  Age                From                      Message
  ----    ------  ----               ----                      -------
  Normal  CREATE  16m                nginx-ingress-controller  Ingress default/abcxyz
  Normal  UPDATE  12m (x2 over 15m)  nginx-ingress-controller  Ingress default/abcxyz

Why is the address empty? I've installed the 'nginx ingress controller' through helm using helm install stable/nginx-ingress - and all of it's pods relevent seem to be running fine.

How can I provide access to the ingress?

-- Chris Stryczynski
kubernetes
kubernetes-ingress

1 Answer

7/9/2018

Type

minikube ip

to retrieve the master IP. for example:

bash-3.2$ minikube ip
192.168.1.100

The command that provides information about the kubernetes cluster is:

bash-3.2$ kubectl cluster-info
Kubernetes master is running at https://192.168.1.100:8443
KubeDNS is running at https://192.168.1.100:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

You can test the ingress controller from the host machine using curl:

bash-3.2$ curl http://192.168.1.100:80
default backend - 404

Finally, add a host entry to be able to use a name to refer to the cluster IP address

In /etc/hosts add:

192.168.1.100   abcxyz
-- Nicola Ben
Source: StackOverflow