Closed meappy closed 3 years ago
Hi, just adding a note, also please see https://github.com/rancher/rancher/issues/17857.
These options in RKE cluster config, configures spec.template.spec.containers.args
however does not change spec.containers.ports
therefore HostPort
is still bound to 80
and 443
ingress:
provider: nginx
extra_args:
http-port: 8080
https-port: 8443
I believe the documentation does mention that ingress controller is bound to port 80 and 443 only.
Template code indicating the ingress ports are bound to 80/443: https://github.com/rancher/kontainer-driver-metadata/blob/dev/rke/templates/nginx-ingress.go#L614
Host networking enabled on the daemonset. https://github.com/rancher/kontainer-driver-metadata/blob/dev/rke/templates/nginx-ingress.go#L190
@ibrokethecloud thanks for this, yes if you're referring to this documentation https://rancher.com/docs/rke/latest/en/config-options/add-ons/ingress-controllers/
Then you're right it does mention that it is bound to 80
and 443
on HostPort. I did mention that I don't believe this is now a bug, would Rancher consider adding this feature to allow changing default HostPort default 80
and 443
for the DaemonSet?
Linking related PR https://github.com/rancher/kontainer-driver-metadata/pull/109
I've run into the same thing... followed the post from @meappy and got everything moved to 8080 and 8443 as well.
However, one of the things I've noticed now is that in the Workloads screen in the Rancher interface it still shows things deployed on port 80 and when you click the links they still go to port 80... which is obviously dead now. If you change the port to 8080, it works fine. Also, kubectl get ingress -A
still shows everything running on port 80.
Available to test in RKE v1.1.11-rc2
rancher/rancher:v2.4-4095-head
Setting in the RKE config
ingress:
provider: nginx
network_mode: hostPort
http_port: 8080
https_port: 8443
Binds the ports correctly
Leaving open until merged in v2.5-head/master-head
Also tested in:
rancher/rancher:v2.5-head bebfe0d
rancher/rancher:master-head 55fc963
RKE version:
Docker version: (
docker version
,docker info
preferred)Operating system and kernel: (
cat /etc/os-release
,uname -r
preferred)Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO) Azure VM
cluster.yml file:
Steps to Reproduce:
nginx-ingress-controller
to listen on portsHTTP/8080
andHTTPS/8443
cluster.yml
filenginx-ingress-controller
continues to be bound toHostPort
80
and443
Results:
nginx-ingress-controller
daemonset resource like so:kubectl delete pod -l app=ingress-nginx -n ingress-nginx
to get fresh pods deployed with the modified configHostPort
8080
and8443
HostPort
HTTP/8080
andHTTPS/78443