2017-03-31 02:01:45 +00:00
|
|
|
|
|
|
|
Using a [ConfigMap](https://kubernetes.io/docs/user-guide/configmap/) is possible to customize the NGINX configuration
|
|
|
|
|
|
|
|
For example, if we want to change the timeouts we need to create a ConfigMap:
|
|
|
|
|
|
|
|
```
|
2017-10-16 12:55:46 +00:00
|
|
|
$ cat configmap.yaml
|
2017-03-31 02:01:45 +00:00
|
|
|
apiVersion: v1
|
|
|
|
data:
|
|
|
|
proxy-connect-timeout: "10"
|
|
|
|
proxy-read-timeout: "120"
|
|
|
|
proxy-send-timeout: "120"
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: nginx-load-balancer-conf
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
2017-10-21 01:38:27 +00:00
|
|
|
curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/customization/custom-configuration/configmap.yaml \
|
2017-10-16 12:55:46 +00:00
|
|
|
| kubectl apply -f -
|
2017-03-31 02:01:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
If the Configmap it is updated, NGINX will be reloaded with the new configuration.
|