@@ -310,7 +310,10 @@ metadata:
310310 k8s-app: kube-dns
311311 kubernetes.io/cluster-service: "true"
312312spec:
313- replicas: 1
313+ # replicas: not specified here:
314+ # 1. In order to make Addon Manager do not reconcile this replicas parameter.
315+ # 2. Default is 1.
316+ # 3. Will be tuned in real time if DNS horizontal auto-scaling is turned on.
314317 selector:
315318 matchLabels:
316319 k8s-app: kube-dns
@@ -324,7 +327,7 @@ spec:
324327 spec:
325328 containers:
326329 - name: kubedns
327- image: gcr.io/google_containers/kubedns-amd64:1.8
330+ image: gcr.io/google_containers/kubedns-amd64:1.9
328331 resources:
329332 # TODO: Set memory limits when we've profiled the container for large
330333 # clusters, then set request = limit to keep this container in
@@ -354,16 +357,25 @@ spec:
354357 initialDelaySeconds: 3
355358 timeoutSeconds: 5
356359 args:
357- # command = "/kube-dns"
358360 - --domain=cluster.local.
359361 - --dns-port=10053
362+ - --config-map=kube-dns
363+ # This should be set to v=2 only after the new image (cut from 1.5) has
364+ # been released, otherwise we will flood the logs.
365+ - --v=0
366+ env:
367+ - name: PROMETHEUS_PORT
368+ value: "10055"
360369 ports:
361370 - containerPort: 10053
362371 name: dns-local
363372 protocol: UDP
364373 - containerPort: 10053
365374 name: dns-tcp-local
366375 protocol: TCP
376+ - containerPort: 10055
377+ name: metrics
378+ protocol: TCP
367379 - name: dnsmasq
368380 image: gcr.io/google_containers/kube-dnsmasq-amd64:1.4
369381 livenessProbe:
@@ -387,6 +399,32 @@ spec:
387399 - containerPort: 53
388400 name: dns-tcp
389401 protocol: TCP
402+ # see: https://github.com/kubernetes/kubernetes/issues/29055 for details
403+ resources:
404+ requests:
405+ cpu: 150m
406+ memory: 10Mi
407+ - name: dnsmasq-metrics
408+ image: gcr.io/google_containers/dnsmasq-metrics-amd64:1.0
409+ livenessProbe:
410+ httpGet:
411+ path: /metrics
412+ port: 10054
413+ scheme: HTTP
414+ initialDelaySeconds: 60
415+ timeoutSeconds: 5
416+ successThreshold: 1
417+ failureThreshold: 5
418+ args:
419+ - --v=2
420+ - --logtostderr
421+ ports:
422+ - containerPort: 10054
423+ name: metrics
424+ protocol: TCP
425+ resources:
426+ requests:
427+ memory: 10Mi
390428 - name: healthz
391429 image: gcr.io/google_containers/exechealthz-amd64:1.2
392430 resources:
@@ -423,7 +461,7 @@ metadata:
423461spec:
424462 selector:
425463 k8s-app: kube-dns
426- clusterIP: 10.3.0.10
464+ clusterIP: 10.3.0.10
427465 ports:
428466 - name: dns
429467 port: 53
0 commit comments