apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: helloworld-from-prometheus
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/name: helloworld
      app.kubernetes.io/instance: helloworld-2aef137c
  policyTypes:
  - Ingress
  ingress:
    - from:
        - namespaceSelector:
            matchLabels:
              kubernetes.io/metadata.name: prometheus
      ports:
        - port: 8081
