apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-wordpress-mariadb
spec:
  podSelector:
    matchLabels:
      app: mariadb
  ingress:
    - from:
      - podSelector:
          matchLabels:
            app: wordpress-wordpress
      ports:
        - protocol: TCP
          port: 3306
