Allow kubernetes services through nginx (no ingress)

4/24/2018

I'm deploying nginx as a container in a pod so that it can deny non-whitelisted traffic and reverse proxy to another container in the pod (can't use ingress controller for reasons). I need to whitelist other services in my cluster. I'd like to whitelist anything in the cluster but specific services is good.

What allow rules do I specify to let other services proxy through nginx?

-- newToScala
kubernetes
nginx

1 Answer

4/25/2018

You can create isolation for your containers via Network Policies.

But please note:

Network policies are implemented by the network plugin, so you must be using a networking solution which supports NetworkPolicy - simply creating the resource without a controller to implement it will have no effect.

For example, you can use Calico or Weave

-- Nick Rak
Source: StackOverflow