kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: allow-nginx-ingress
spec:
  podSelector:
    matchLabels:
      network/allow-nginx-ingress: "true"
  ingress:
  - from:
    - podSelector:
        matchLabels:
          app.kubernetes.io/name: ingress-nginx
      namespaceSelector:
        matchLabels:
          type: ingress-nginx
    # ports:
    # - protocol: TCP
    #   port: 6379