Nginx Ingress does not route on Docker for Mac, the Address field of ingress is still null

7/14/2019

I am trying to create a simple fanout ingress with mac docker desktop. I am using the example from here.

I have followed the installation guide and confirmed nginx-ingress-controller deployment running

cc-backend ➤ kubectl get pods -n ingress-nginx                                                                                                                  
NAME                                      READY     STATUS    RESTARTS   AGE
nginx-ingress-controller-54f689bd-64sp5   1/1       Running   0          6h

cc-backend ➤ kubectl get deployment -n ingress-nginx                                                                                                            
NAME                       DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
nginx-ingress-controller   1         1         1            1           6h

But the Address field is null and localhost is unreachable.

cc-backend ➤ kubectl describe ingress                                                                                                                           
Name:             simple-fanout-example
Namespace:        default
Address:
Default backend:  default-http-backend:80 (<none>)
Rules:
  Host  Path  Backends
  ----  ----  --------
  *
        /apple    apple-service:5678 (<none>)
        /banana   banana-service:5678 (<none>)
Annotations:
  nginx.ingress.kubernetes.io/rewrite-target:  /
Events:
  Type    Reason  Age   From                      Message
  ----    ------  ----  ----                      -------
  Normal  CREATE  54m   nginx-ingress-controller  Ingress default/simple-fanout-example

cc-backend ➤ curl -kL http://localhost                                                                                                                          
curl: (7) Failed to connect to localhost port 80: Connection refused


kubectl get svc -n ingress-nginx
NAME            TYPE           CLUSTER-IP    EXTERNAL-IP   PORT(S)                      AGE
ingress-nginx   LoadBalancer   10.96.200.3   <pending>     80:31036/TCP,443:32756/TCP   1d

What else did I miss ?

-- Qiulang
docker-for-mac
kubernetes
kubernetes-ingress

0 Answers