Skip to content

Nginx Ingress does not route on Docker for Mac #2415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jpswade opened this issue Apr 24, 2018 · 9 comments
Closed

Nginx Ingress does not route on Docker for Mac #2415

jpswade opened this issue Apr 24, 2018 · 9 comments

Comments

@jpswade
Copy link

jpswade commented Apr 24, 2018

NGINX Ingress controller version: 0.13.0

Kubernetes version (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.6", GitCommit:"9f8ebd171479bec0ada837d7ee641dec2f8c6dd1", GitTreeState:"clean", BuildDate:"2018-03-21T15:21:50Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.6", GitCommit:"9f8ebd171479bec0ada837d7ee641dec2f8c6dd1", GitTreeState:"clean", BuildDate:"2018-03-21T15:13:31Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Cloud provider or hardware configuration: Mac

  • OS (e.g. from /etc/os-release):
    $ sw_vers
    ProductName: Mac OS X
    ProductVersion: 10.11.6
    BuildVersion: 15G1611

  • Kernel (e.g. uname -a):
    Darwin James-MacBook-Pro.local 15.6.0 Darwin Kernel Version 15.6.0: Sun Jun 4 21:43:07 PDT 2017; root:xnu-3248.70.3~1/RELEASE_X86_64 x86_64

  • Install tools:
    Docker for Mac

  • Others:

What happened:
$ nc -v -z localhost 80
nc: connectx to localhost port 80 (tcp) failed: Connection refused
nc: connectx to localhost port 80 (tcp) failed: Connection refused
nc: connectx to localhost port 80 (tcp) failed: Connection refused

What you expected to happen:
I'd expect it to be up and running on port 80 and route to the correct place.

How to reproduce it (as minimally and precisely as possible):
https://gist.github.com/jpswade/eed2033d04ca93af7745c418065efd2f

Anything else we need to know:

@jpswade
Copy link
Author

jpswade commented Apr 24, 2018

I'm also seeing this:

$ helm init
...
Error: Get https://localhost:6443/api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller: tls: failed to parse certificate from server: x509: cannot parse dnsName "kubernetes.default.svc."

I think it's all related...

istio/istio#4847
#2188
kubernetes-retired/federation#255
helm/helm#3873
golang/go#23995
...
docker/for-mac#2811

This seems to be the dependency here... Will test again next week...

@antoineco
Copy link
Contributor

antoineco commented Apr 24, 2018

You need to expose ingress-nginx behind a Service of type LoadBalancer for Docker for Mac to expose it on your local port 80. Is that what you did?
ref #2409

@antoineco
Copy link
Contributor

antoineco commented Apr 24, 2018

helm init ... Error:

This is because Docker for Mac requires you to use --insecure-skip-tls-verify. This is a question related to Helm specifically, not ingress-nginx.

@aledbf
Copy link
Member

aledbf commented Apr 25, 2018

@jpswade please follow the Docker for mac guide

@aledbf
Copy link
Member

aledbf commented Apr 25, 2018

Closing. Please reopen if you still have issues after using the mentioned guide

@aledbf aledbf closed this as completed Apr 25, 2018
@jpswade
Copy link
Author

jpswade commented May 21, 2018

@aledbf,

As per the documentation, i've run:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/provider/cloud-generic.yaml

When I try it out, I get "502 Bad Gateway", here's the logs:

[error] 41#41: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.65.3, server: legacy.xxx.xxx.xxx.xxx, request: "GET / HTTP/1.1", upstream: "http://10.1.1.119:80/", host: "legacy.xxx.xxx.xxx.xxx"
192.168.65.3 - [192.168.65.3] - - [21/May/2018:14:55:28 +0000] "GET / HTTP/1.1" 502 576 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36" 1649 0.001 [default-xxx-80] 10.1.1.119:80 0 0.000 502 xxx

@celioeduardo
Copy link

@qiulang
Copy link

qiulang commented Jul 15, 2019

@aledbf can you check my issue ? I have followed the guide but I can't make it work.
Do I need to install NGINX Ingress controller using Helm ?

@Iaincox
Copy link

Iaincox commented Sep 26, 2022

I have set up nginx as an ingress controller it works fine with Firefox & Safari but chrome gives a 404?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants