k8s.io/kubernetes@v1.31.0-alpha.0.0.20240520171757-56147500dadc/test/kubemark/resources/kube_dns_template.yaml (about) 1 apiVersion: v1 2 kind: Service 3 metadata: 4 name: kube-dns 5 namespace: kubemark 6 labels: 7 k8s-app: kube-dns 8 kubernetes.io/cluster-service: "true" 9 addonmanager.kubernetes.io/mode: Reconcile 10 kubernetes.io/name: "KubeDNS" 11 spec: 12 selector: 13 k8s-app: kube-dns 14 ports: 15 - name: dns 16 port: 53 17 protocol: UDP 18 - name: dns-tcp 19 port: 53 20 protocol: TCP 21 --- 22 apiVersion: v1 23 kind: ServiceAccount 24 metadata: 25 name: kube-dns 26 namespace: kubemark 27 labels: 28 kubernetes.io/cluster-service: "true" 29 addonmanager.kubernetes.io/mode: Reconcile 30 --- 31 apiVersion: v1 32 kind: ConfigMap 33 metadata: 34 name: kube-dns 35 namespace: kubemark 36 labels: 37 addonmanager.kubernetes.io/mode: EnsureExists 38 --- 39 apiVersion: apps/v1 40 kind: Deployment 41 metadata: 42 name: kube-dns 43 namespace: kubemark 44 labels: 45 k8s-app: kube-dns 46 kubernetes.io/cluster-service: "true" 47 addonmanager.kubernetes.io/mode: Reconcile 48 spec: 49 strategy: 50 rollingUpdate: 51 maxSurge: 10% 52 maxUnavailable: 0 53 selector: 54 matchLabels: 55 k8s-app: kube-dns 56 template: 57 metadata: 58 labels: 59 k8s-app: kube-dns 60 spec: 61 priorityClassName: system-node-critical 62 tolerations: 63 - key: "CriticalAddonsOnly" 64 operator: "Exists" 65 volumes: 66 - name: kube-dns-config 67 configMap: 68 name: kube-dns 69 optional: true 70 - name: secret-volume 71 secret: 72 secretName: kubeconfig 73 containers: 74 - name: kubedns 75 image: registry.k8s.io/k8s-dns-kube-dns-amd64:1.14.9 76 resources: 77 limits: 78 memory: 170Mi 79 requests: 80 cpu: 100m 81 memory: 70Mi 82 livenessProbe: 83 httpGet: 84 path: /healthcheck/kubedns 85 port: 10054 86 scheme: HTTP 87 initialDelaySeconds: 60 88 timeoutSeconds: 5 89 successThreshold: 1 90 failureThreshold: 5 91 readinessProbe: 92 httpGet: 93 path: /readiness 94 port: 8081 95 scheme: HTTP 96 initialDelaySeconds: 3 97 timeoutSeconds: 5 98 args: 99 - --domain={{dns_domain}}. 100 - --dns-port=10053 101 - --config-dir=/kube-dns-config 102 - --kubecfg-file=/etc/secret-volume/dns.kubeconfig 103 - --v=2 104 env: 105 - name: PROMETHEUS_PORT 106 value: "10055" 107 ports: 108 - containerPort: 10053 109 name: dns-local 110 protocol: UDP 111 - containerPort: 10053 112 name: dns-tcp-local 113 protocol: TCP 114 - containerPort: 10055 115 name: metrics 116 protocol: TCP 117 volumeMounts: 118 - name: kube-dns-config 119 mountPath: /kube-dns-config 120 - name: secret-volume 121 mountPath: /etc/secret-volume 122 - name: dnsmasq 123 image: registry.k8s.io/k8s-dns-dnsmasq-nanny-amd64:1.14.9 124 livenessProbe: 125 httpGet: 126 path: /healthcheck/dnsmasq 127 port: 10054 128 scheme: HTTP 129 initialDelaySeconds: 60 130 timeoutSeconds: 5 131 successThreshold: 1 132 failureThreshold: 5 133 args: 134 - -v=2 135 - -logtostderr 136 - -configDir=/etc/k8s/dns/dnsmasq-nanny 137 - -restartDnsmasq=true 138 - -- 139 - -k 140 - --cache-size=1000 141 - --no-negcache 142 - --dns-loop-detect 143 - --log-facility=- 144 - --server=/{{dns_domain}}/127.0.0.1#10053 145 - --server=/in-addr.arpa/127.0.0.1#10053 146 - --server=/ip6.arpa/127.0.0.1#10053 147 ports: 148 - containerPort: 53 149 name: dns 150 protocol: UDP 151 - containerPort: 53 152 name: dns-tcp 153 protocol: TCP 154 # see: https://github.com/kubernetes/kubernetes/issues/29055 for details 155 resources: 156 requests: 157 cpu: 150m 158 memory: 20Mi 159 volumeMounts: 160 - name: kube-dns-config 161 mountPath: /etc/k8s/dns/dnsmasq-nanny 162 - name: sidecar 163 image: registry.k8s.io/k8s-dns-sidecar-amd64:1.14.9 164 livenessProbe: 165 httpGet: 166 path: /metrics 167 port: 10054 168 scheme: HTTP 169 initialDelaySeconds: 60 170 timeoutSeconds: 5 171 successThreshold: 1 172 failureThreshold: 5 173 args: 174 - --v=2 175 - --logtostderr 176 - --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.{{dns_domain}},5,SRV 177 - --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.{{dns_domain}},5,SRV 178 ports: 179 - containerPort: 10054 180 name: metrics 181 protocol: TCP 182 resources: 183 requests: 184 memory: 20Mi 185 cpu: 10m 186 dnsPolicy: Default # Don't use cluster DNS. 187 serviceAccountName: kube-dns