I've installed nginx ingress using helm on Google Cloud Kubernetes. The service, controller and default backend are up and running and I can perform a GET request on the /healthz endpoint. However, when I try to setup my Ingress, it shows a different load balancer IP than the controller does. In my case the controller shows 35.246.249.9 (port 80 and 443) and the Ingress shows 35.246.171.243. When I try to connect to the second IP, the connection gets refused.
This is my Ingress yaml:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress-nginx-integration
namespace: integration
annotations:
kubernetes.io/ingress.class: "nginx"
kubernetes.io/ingress.global-static-ip-name: website-com
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- host: website.com
http:
paths:
- backend:
serviceName: website
servicePort: 4000
Ingress description:
Name: ingress-nginx-integration
Namespace: integration
Address: 35.246.171.243
Default backend: default-http-backend:80 (10.20.2.8:8080)
Rules:
Host Path Backends
---- ---- --------
website.com
website:4000 (<none>)
Annotations:
kubernetes.io/ingress.global-static-ip-name: website-com
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/ssl-redirect: false
kubectl.kubernetes.io/last-applied-configuration: ....
kubernetes.io/ingress.class: nginx
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal UPDATE 18m (x9 over 58m) nginx-ingress-controller Ingress integration/ingress-nginx-integration
Normal DELETE 6m34s nginx-ingress-controller Ingress integration/ingress-nginx-integration
Normal CREATE 2m16s (x2 over 59m) nginx-ingress-controller Ingress integration/ingress-nginx-integration
Controller description:
Name: nginx-ingress-controller
Namespace: integration
Labels: app=nginx-ingress
chart=nginx-ingress-1.1.5
component=controller
heritage=Tiller
release=nginx-ingress
Annotations: <none>
Selector: app=nginx-ingress,component=controller,release=nginx-ingress
Type: LoadBalancer
IP: 10.23.243.186
LoadBalancer Ingress: 35.246.249.9
Port: http 80/TCP
TargetPort: http/TCP
NodePort: http 30996/TCP
Endpoints: 10.20.2.62:80
Port: https 443/TCP
TargetPort: https/TCP
NodePort: https 32752/TCP
Endpoints: 10.20.2.62:443
Session Affinity: None
External Traffic Policy: Cluster
Events: <none>
Both, Ingress and controller, run inside the "integration" namespace. I followed this tutorial for the most part: https://cloud.google.com/community/tutorials/nginx-ingress-gke Everything worked before, when I used the default gce ingress controller, but I need http -> https redirects.
Why does it show a different load balancer IP, is that correct? And if so, why does it refuse connections?
Let me know if you need more information.