title: Kubernetes Ingress Whitelist IP for path
body: <p>I know I can whitelist IPs for the entire ingress object, but is there a way to whitelist IPs for individual paths?  For example, if I only want to allow <code>/admin</code> to be accessed from <code>10.0.0.0/16</code>?</p>
  
  <p><code>ingress.yml</code>:</p>
  
  <pre><code>---
  apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: frontend
    namespace: default
    labels:
      app: frontend
    annotations:
      kubernetes.io/ingress.class: nginx
      cert-manager.io/cluster-issuer: "letsencrypt-prod"
      #nginx.ingress.kubernetes.io/whitelist-source-range: "10.0.0.0/16"
  spec:
    tls:
      - hosts:
          - frontend.example.com
        secretName: frontend-tls
    rules:
      - host: frontend.example.com
        http:
          paths:
            - path: /
              backend:
                serviceName: frontend
                servicePort: 80
            - path: /api
              backend:
                serviceName: api
                servicePort: 8000
            - path: /admin
              backend:
                serviceName: api
                servicePort: 8000
            - path: /staticfiles
              backend:
                serviceName: api
                servicePort: 80
  </code></pre>