github.phpd.cn/cilium/cilium@v1.6.12/test/k8sT/manifests/bind_deployment.yaml (about) 1 --- 2 kind: ConfigMap 3 apiVersion: v1 4 metadata: 5 name: bind-config 6 namespace: default 7 data: 8 db.cilium.test: | 9 $TTL 300 10 $ORIGIN cilium.test. 11 @ IN SOA cilium.test. admin.cilium.test. ( 12 200608081 ; serial, todays date + todays serial # 13 8H ; refresh, seconds 14 2H ; retry, seconds 15 4W ; expire, seconds 16 1D ) ; minimum, seconds 17 ; 18 ; 19 @ IN NS server 20 21 server.cilium.test. IN A 127.0.0.1 22 world1.cilium.test. IN A 192.168.9.10 23 world2.cilium.test. IN A 192.168.9.11 24 25 named.conf: | 26 options { 27 directory "/var/cache/bind"; 28 dnssec-validation auto; 29 30 auth-nxdomain no; # conform to RFC1035 31 listen-on-v6 { any; }; 32 }; 33 34 logging { 35 category default { default_stderr; }; 36 category queries { default_stderr; }; 37 }; 38 39 zone "cilium.test" { 40 type master; 41 file "/data/db.cilium.test"; 42 }; 43 --- 44 apiVersion: apps/v1 45 kind: Deployment 46 metadata: 47 labels: 48 zgroup: bind 49 name: bind 50 namespace: default 51 spec: 52 selector: 53 matchLabels: 54 zgroup: bind 55 replicas: 1 56 template: 57 metadata: 58 creationTimestamp: null 59 labels: 60 zgroup: bind 61 spec: 62 containers: 63 - image: docker.io/cilium/docker-bind:v0.1 64 command: [ "/usr/sbin/named"] 65 args: 66 - "-c" 67 - "/data/named.conf.local" 68 - "-u" 69 - "bind" 70 - "-f" 71 - "-d" 72 - "8" 73 imagePullPolicy: IfNotPresent 74 name: bind 75 ports: 76 - containerPort: 53 77 name: dns 78 protocol: UDP 79 - containerPort: 53 80 name: dns-tcp 81 protocol: TCP 82 volumeMounts: 83 - mountPath: /data/ 84 name: config-volume 85 securityContext: 86 privileged: true 87 dnsPolicy: Default 88 restartPolicy: Always 89 terminationGracePeriodSeconds: 0 90 volumes: 91 - name: config-volume 92 configMap: 93 defaultMode: 0777 94 items: 95 - key: db.cilium.test 96 path: db.cilium.test 97 - key: named.conf 98 path: named.conf.local 99 name: bind-config 100 --- 101 apiVersion: v1 102 kind: Service 103 metadata: 104 name: bind 105 namespace: default 106 labels: 107 zgroup: bind 108 spec: 109 selector: 110 zgroup: bind 111 clusterIP: 10.96.0.100 112 ports: 113 - name: dns 114 port: 53 115 protocol: UDP 116 - name: dns-tcp 117 port: 53 118 protocol: TCP