title: How to add blocking IP rules on each nginx-ingress host
body: <p>I have searched a lot and I didn't find the solution. I want to block/allow ip's into each host definition in the nginx-ingress, not per locations.</p>
  
  <p>This is the ingress.yaml:</p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: ingress-nginx
    annotations:
      kubernetes.io/ingress.class: "nginx"
  spec:
    rules:
    - host: test1.test.com
      #Blocking rules here, only affecting test1.test.com domain
      http:
        paths:
        - path: /
          backend:
            serviceName: wordpressA
            servicePort: 80
    - host: test2.test.com
      #Blocking rules here, only affecting test2.test.com domain
      http:
        paths:
        - path: /
          backend:
            serviceName: wordpressB
            servicePort: 80 
  </code></pre>
  
  <p>Many thanks for your time</p>