# ports: allow traffic to containerPort equal to 3090.
# Even when using a service, it will use the container port and not the service port.

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: netpol1
spec:
  podSelector:
    matchLabels:
      app: backend
  ingress:
  - from:
      - podSelector:
          matchLabels:
            app: frontend
    ports:
    - port: 3090
