Nginx Ingress在Mac的Docker上无法路由,Ingress的Address字段仍然为null

时间:2019-07-14 03:45:56

标签: kubernetes kubernetes-ingress docker-for-mac

我正在尝试使用mac docker桌面创建一个simple fanout ingress。我正在使用here中的示例。

我已遵循the installation guide并确认正在运行nginx-ingress-controller部署

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

但是“地址”字段为空,并且本地主机不可访问。

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

我还想念什么?

0 个答案:

没有答案