2018-04-24 10:18:29 +00:00
|
|
|
# Custom Headers
|
2017-02-07 21:04:15 +00:00
|
|
|
|
|
|
|
This example aims to demonstrate the deployment of an nginx ingress controller and
|
|
|
|
use a ConfigMap to configure a custom list of headers to be passed to the upstream
|
|
|
|
server
|
|
|
|
|
2017-02-11 20:19:43 +00:00
|
|
|
```console
|
2017-10-21 01:38:27 +00:00
|
|
|
curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/customization/custom-headers/configmap.yaml \
|
2017-10-16 12:55:46 +00:00
|
|
|
| kubectl apply -f -
|
2017-02-11 20:19:43 +00:00
|
|
|
|
2017-10-21 01:38:27 +00:00
|
|
|
curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/customization/custom-headers/custom-headers.yaml \
|
2017-10-16 12:55:46 +00:00
|
|
|
| kubectl apply -f -
|
2017-02-07 21:04:15 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
2017-02-11 20:19:43 +00:00
|
|
|
## Test
|
2017-02-07 21:04:15 +00:00
|
|
|
|
2017-02-11 20:19:43 +00:00
|
|
|
Check the contents of the configmap is present in the nginx.conf file using:
|
|
|
|
`kubectl exec nginx-ingress-controller-873061567-4n3k2 -n kube-system cat /etc/nginx/nginx.conf`
|