mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-05-17 02:23:19 +00:00
Add hostNetwork option for ingress controller
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user