From cd0ed6fce266c273a4fe986b09f7ec79bd88982d Mon Sep 17 00:00:00 2001 From: Sebastiaan van Steenis Date: Wed, 29 Sep 2021 13:32:41 +0200 Subject: [PATCH] Add hostNetwork option for ingress controller --- .../add-ons/ingress-controllers/_index.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/content/rke/latest/en/config-options/add-ons/ingress-controllers/_index.md b/content/rke/latest/en/config-options/add-ons/ingress-controllers/_index.md index 0c8f1183009..7992d4482e7 100644 --- a/content/rke/latest/en/config-options/add-ons/ingress-controllers/_index.md +++ b/content/rke/latest/en/config-options/add-ons/ingress-controllers/_index.md @@ -116,10 +116,10 @@ ingress: ### Configuring network options {{% tabs %}} -{{% tab "v1.30" %}} +{{% tab "v1.3.x" %}} For Kubernetes v1.21 and up, the NGINX ingress controller no longer runs in `hostNetwork: true` but uses hostPorts for port `80` and port `443`. This was done so the admission webhook can be configured to be accessed using ClusterIP so it can only be reached inside the cluster. If you want to change the mode and/or the ports, see the options below. {{% /tab %}} -{{% tab "v1.1.11 - v1.2.8" %}} +{{% tab "v1.1.11 and up & v1.2.x" %}} By default, the nginx ingress controller is configured using `hostNetwork: true` on the default ports `80` and `443`. If you want to change the mode and/or the ports, see the options below. {{% /tab %}} {{% /tabs %}} @@ -137,6 +137,14 @@ ingress: https-port: 8443 ``` +Configure the nginx ingress controller using `hostNetwork`: + +```yaml +ingress: + provider: nginx + network_mode: hostNetwork +``` + Configure the nginx ingress controller with no network mode which will make it run on the overlay network (for example, if you want to expose the nginx ingress controller using a `LoadBalancer`) and override the default ports: ```yaml