2018-02-12 23:14:11 +00:00
|
|
|
# Sysctl tuning
|
|
|
|
|
2022-01-17 00:57:28 +00:00
|
|
|
This example aims to demonstrate the use of an Init Container to adjust sysctl default values using `kubectl patch`.
|
2018-02-12 23:14:11 +00:00
|
|
|
|
|
|
|
```console
|
2021-11-28 21:11:22 +00:00
|
|
|
kubectl patch deployment -n ingress-nginx ingress-nginx-controller \
|
2021-08-07 00:07:29 +00:00
|
|
|
--patch="$(curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/docs/examples/customization/sysctl/patch.json)"
|
2018-02-12 23:14:11 +00:00
|
|
|
```
|
|
|
|
|
2019-12-02 00:48:00 +00:00
|
|
|
**Changes:**
|
2019-12-02 00:57:09 +00:00
|
|
|
|
2019-12-02 00:48:00 +00:00
|
|
|
- Backlog Queue setting `net.core.somaxconn` from `128` to `32768`
|
|
|
|
- Ephemeral Ports setting `net.ipv4.ip_local_port_range` from `32768 60999` to `1024 65000`
|
|
|
|
|
2019-12-02 00:57:09 +00:00
|
|
|
In a [post from the NGINX blog](https://www.nginx.com/blog/tuning-nginx/), it is possible to see an explanation for the changes.
|