-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Describe the bug
with kubernete 1.21.1 cluster (with 3 linux and 3 windows nodes) and nginx-ingress (kubernetes-ingress v1.11.3 ) we are constantly getting 404 not found
To Reproduce
Steps to reproduce the behavior:
- installed the nginx-ingress controller with manifests using the documentation on https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/
- deploying the cafe.example.com from the version v1.11.3 of kubernetes-ingress using the documented process in README.md with the slight modification of using nodeselector to force the running on the linux nodes. We have added the nginx-ingress external ip (using metallb) to the host file for cafe.example.com (10.244.0.30 cafe.example.com)
kubectl get svc -o wide -n nginx-ingress
nginx-ingress LoadBalancer 10.111.32.192 10.244.0.30 80:32132/TCP,443:32544/TCP 14d app=nginx-ingress
shows the ingress controller running with a metallb provided external IP
kubectl get ingress
NAME CLASS HOSTS ADDRESS PORTS AGE
cafe-ingress cafe.example.com 80, 443 39m
kubectl get pods -A showing only cafe related
default coffee-6d68b8ff4f-8jdkf 1/1 Running 0 31m
default coffee-6d68b8ff4f-g5rpk 1/1 Running 0 31m
default tea-766cdd6757-gdj57 1/1 Running 0 31m
default tea-766cdd6757-kswcj 1/1 Running 0 31m
default tea-766cdd6757-smqjx 1/1 Running 0 31m
doing curl --resolve cafe.example.com:80:10.244.0.30 -v http://cafe.example.com returns 404
- Added cafe.example.com:80:10.244.0.30 to DNS cache
- About to connect() to cafe.example.com port 80 (#0)
- Trying 10.244.0.30...
- Connected to cafe.example.com (10.244.0.30) port 80 (#0)
GET / HTTP/1.1
User-Agent: curl/7.29.0
Host: cafe.example.com
Accept: /
< HTTP/1.1 404 Not Found
< Server: nginx/1.21.0
< Date: Thu, 17 Jun 2021 19:22:37 GMT
< Content-Type: text/html
< Content-Length: 153
< Connection: keep-alive
<
404 Not Found
nginx/1.21.0 * Connection #0 to host cafe.example.com left intact 2. View logs on '....' 3. See error
Expected behavior
expected the nginx-ingress to route to the cafe or tea deployments
Your environment
- Kubernetes v 1.21.1
- On premise bare metal setup with 3 linux 3 windows nodes... linux control plane.
- using nginx
kubectl get ingress cafe-ingress
NAME CLASS HOSTS ADDRESS PORTS AGE
cafe-ingress cafe.example.com 80, 443 43m
kubectl describe ingress cafe-ingress
Name: cafe-ingress
Namespace: default
Address:
Default backend: default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
TLS:
cafe-secret terminates cafe.example.com
Rules:
Host Path Backends
cafe.example.com
/tea tea-svc:80 (192.168.1.26:8080,192.168.2.33:8080,192.168.2.34:8080)
/coffee coffee-svc:80 (192.168.2.31:8080,192.168.2.32:8080)
Annotations:
Events:
curl 192.168.1.26:8080
Server address: 192.168.1.26:8080
Server name: tea-766cdd6757-kswcj
Date: 17/Jun/2021:19:26:10 +0000
URI: /
Request ID: 60d611f651c50b9186804c420882fc8e
curl cafe.example.com
<title>404 Not Found</title>404 Not Found
nginx/1.21.0