--- apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: asterisk spec: podSelector: matchLabels: app: asterisk policyTypes: - Ingress - Egress ingress: - from: - namespaceSelector: matchLabels: kubernetes.io/metadata.name: monitoring podSelector: matchLabels: app.kubernetes.io/name: prometheus - from: - ipBlock: cidr: 100.101.0.0/16 - from: - ipBlock: cidr: 100.102.0.0/16 - from: - ipBlock: cidr: 81.90.125.224/32 - from: - ipBlock: cidr: 195.222.16.36/32 egress: - to: - ipBlock: cidr: 195.222.16.36/32