Allow only one host to connect using ingress nginx configmap

10/9/2018

I can see that nginx has an option to allow and deny. I can allow host.domain.com and deny all using nginx see: https://support.hypernode.com/knowledgebase/blocking-allowing-ip-addresses-in-nginx/.

However, how can I describe that in the ConfigMap for the ingress? I see the block-cidrs option in the doc https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/. An example ConfigMap would be very helpful. Or should this be done by using a nginx template?

-- user1767752
kubernetes
nginx
nginx-ingress

0 Answers