Which Network Policy Overrides?

If we have multiple network policies whose some parts collide with each other, then which ones will be applied? How to know which ones overwrite?

Hello MMP
we can say that the allow rule will always win.
example: Suppose you have 2 policies: 1 rule to deny all traffic and 2nd one to allow traffic to the chosen app. Whatever rule order you chose - ingress traffic will be allowed to pods with label app: web insight namespace: default

deny-all.yaml:

kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: default-deny-all
  namespace: default
spec:
  podSelector: {}
  ingress: []

apply-nginx-app.yaml:

kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: web-allow-all
  namespace: default
spec:
  podSelector:
    matchLabels:
      app: web
  ingress:
  - {}

Thanks,
KodeKloud Support