apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: open-port-80-only
spec:
  podSelector:
    matchLabels:
      tier: web
  policyTypes:
  - Ingress
  ingress:
  - from:
    - podSelector:
        matchLabels:
          tier: database
    ports:
    - protocol: TCP
      port: 80
