4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
17 apiVersion: apps/v1beta2
21 namespace: kube-system
23 {{ caas.kubernetes_component_label }}: kube-dns
24 kubernetes.io/cluster-service: "true"
25 addonmanager.kubernetes.io/mode: Reconcile
29 {{ caas.kubernetes_component_label }}: kube-dns
33 {{ caas.kubernetes_component_label }}: kube-dns
35 scheduler.alpha.kubernetes.io/critical-pod: ''
36 scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
38 priorityClassName: "system-cluster-critical"
43 - key: "CriticalAddonsOnly"
51 path: /etc/kubernetes/ssl
52 - name: secret-root-ca
54 path: /etc/openssl/ca.pem
57 path: /etc/resolv.conf
60 path: /etc/kubernetes/kubeconfig
61 - name: external-dns-conf
66 image: {{ container_image_names | select('search', '/kubedns') | list | last }}
68 runAsUser: {{ caas.uid.kubedns }}
70 # TODO: Set memory limits when we've profiled the container for large
71 # clusters, then set request = limit to keep this container in
72 # guaranteed class. Currently, this container falls into the
73 # "burstable" category so the kubelet doesn't backoff from restarting it.
82 initialDelaySeconds: 60
91 # we poll on pod startup for the Kubernetes master service and
92 # only setup the /readiness HTTP server once that's available.
93 initialDelaySeconds: 3
98 - --domain={{ caas.dns_domain }}.
100 - --config-dir=/etc/dns_config
103 - containerPort: 10053
106 - containerPort: 10053
109 - containerPort: 10055
118 mountPath: /etc/localtime
121 mountPath: /etc/kubernetes/ssl
123 - name: secret-root-ca
124 mountPath: /etc/openssl/ca.pem
127 mountPath: /etc/kubernetes/kubeconfig
130 mountPath: /etc/resolv.conf
131 - name: external-dns-conf
132 mountPath: /etc/dns_config
134 image: {{ container_image_names | select('search', '/kubedns') | list | last }}
137 add: ["NET_BIND_SERVICE"]
138 runAsUser: {{ caas.uid.kubedns }}
142 initialDelaySeconds: 60
147 - /usr/bin/dnsmasq-nanny
151 - -configDir=/etc/k8s/dns/dnsmasq-nanny
152 - -restartDnsmasq=true
155 - --interface={{ networking.infra_internal.interface }}
157 - --dns-forward-max=1000
159 - --server=/{{ caas.dns_domain }}/127.0.0.1#10053
160 # see: https://github.com/kubernetes/kubernetes/issues/29055 for details
167 mountPath: /etc/localtime
170 mountPath: /etc/kubernetes/ssl
173 mountPath: /etc/kubernetes/kubeconfig
176 mountPath: /etc/resolv.conf
177 - name: external-dns-conf
178 mountPath: /etc/k8s/dns/dnsmasq-nanny
179 dnsPolicy: Default # Don't use cluster DNS.
180 serviceAccountName: kube-dns