github.phpd.cn/cilium/cilium@v1.6.12/test/k8sT/manifests/netcat-ds.yaml (about)

     1  ---
     2  apiVersion: apps/v1
     3  kind: DaemonSet
     4  metadata:
     5    name: netcatds
     6    namespace: default
     7  spec:
     8    selector:
     9      matchLabels:
    10        zgroup: netcatds
    11    template:
    12      metadata:
    13        labels:
    14          zgroup: netcatds
    15      spec:
    16        terminationGracePeriodSeconds: 0
    17        containers:
    18        - name: netcat
    19          image: docker.io/cilium/demo-client:latest
    20          imagePullPolicy: IfNotPresent
    21          command: [ "sleep" ]
    22          args:
    23            - "1000h"
    24          ports:
    25            - containerPort: 8888
    26        tolerations:
    27        - effect: NoSchedule
    28          key: node-role.kubernetes.io/master
    29        - effect: NoSchedule
    30          key: node.cloudprovider.kubernetes.io/uninitialized
    31          value: "true"
    32  ---
    33  apiVersion: "cilium.io/v2"
    34  kind: CiliumNetworkPolicy
    35  description: "L7 policy for incoming http "
    36  metadata:
    37    name: "netcat-ds"
    38  spec:
    39    endpointSelector:
    40      matchLabels:
    41        zgroup: netcatds
    42    ingress:
    43    - fromEndpoints:
    44      - matchLabels:
    45          zgroup: netcatds
    46      toPorts:
    47      - ports:
    48        - port: "8888"
    49          protocol: TCP
    50        rules:
    51          http:
    52          - method: "GET"
    53            path: "/public"