github.com/looshlee/cilium@v1.6.12/examples/kubernetes-dns/dns-matchname.yaml (about)

     1  apiVersion: "cilium.io/v2"
     2  kind: CiliumNetworkPolicy
     3  metadata:
     4    name: "fqdn"
     5  spec:
     6    endpointSelector:
     7      matchLabels:
     8        org: empire
     9        class: mediabot
    10    egress:
    11    - toFQDNs:
    12      - matchName: "api.twitter.com"  
    13    - toEndpoints:
    14      - matchLabels:
    15          "k8s:io.kubernetes.pod.namespace": kube-system
    16          "k8s:k8s-app": kube-dns
    17      toPorts:
    18      - ports:
    19        - port: "53"
    20          protocol: ANY
    21        rules:
    22          dns:
    23          - matchPattern: "*"