1
+ apiVersion : v1
2
+ kind : Service
3
+ metadata :
4
+ name : kube-dns
5
+ namespace : kube-system
6
+ labels :
7
+ k8s-app : kube-dns
8
+ kubernetes.io/cluster-service : " true"
9
+ kubernetes.io/name : " KubeDNS"
10
+ spec :
11
+ selector :
12
+ k8s-app : kube-dns
13
+ clusterIP : 10.100.0.10
14
+ ports :
15
+ - name : dns
16
+ port : 53
17
+ protocol : UDP
18
+ - name : dns-tcp
19
+ port : 53
20
+ protocol : TCP
21
+ ---
22
+
23
+ apiVersion : extensions/v1beta1
24
+ kind : Deployment
25
+ metadata :
26
+ name : kube-dns
27
+ namespace : kube-system
28
+ labels :
29
+ k8s-app : kube-dns
30
+ kubernetes.io/cluster-service : " true"
31
+ addonmanager.kubernetes.io/mode : Reconcile
32
+ spec :
33
+ # replicas: not specified here:
34
+ # 1. In order to make Addon Manager do not reconcile this replicas parameter.
35
+ # 2. Default is 1.
36
+ # 3. Will be tuned in real time if DNS horizontal auto-scaling is turned on.
37
+ strategy :
38
+ rollingUpdate :
39
+ maxSurge : 10%
40
+ maxUnavailable : 0
41
+ selector :
42
+ matchLabels :
43
+ k8s-app : kube-dns
44
+ template :
45
+ metadata :
46
+ labels :
47
+ k8s-app : kube-dns
48
+ annotations :
49
+ scheduler.alpha.kubernetes.io/critical-pod : ' '
50
+ spec :
51
+ tolerations :
52
+ - key : " CriticalAddonsOnly"
53
+ operator : " Exists"
54
+ volumes :
55
+ - name : kube-dns-config
56
+ configMap :
57
+ name : kube-dns
58
+ optional : true
59
+ containers :
60
+ - name : kubedns
61
+ image : gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.4
62
+ resources :
63
+ # TODO: Set memory limits when we've profiled the container for large
64
+ # clusters, then set request = limit to keep this container in
65
+ # guaranteed class. Currently, this container falls into the
66
+ # "burstable" category so the kubelet doesn't backoff from restarting it.
67
+ limits :
68
+ memory : 170Mi
69
+ requests :
70
+ cpu : 100m
71
+ memory : 70Mi
72
+ livenessProbe :
73
+ httpGet :
74
+ path : /healthcheck/kubedns
75
+ port : 10054
76
+ scheme : HTTP
77
+ initialDelaySeconds : 60
78
+ timeoutSeconds : 5
79
+ successThreshold : 1
80
+ failureThreshold : 5
81
+ readinessProbe :
82
+ httpGet :
83
+ path : /readiness
84
+ port : 8081
85
+ scheme : HTTP
86
+ # we poll on pod startup for the Kubernetes master service and
87
+ # only setup the /readiness HTTP server once that's available.
88
+ initialDelaySeconds : 3
89
+ timeoutSeconds : 5
90
+ args :
91
+ - --domain=cluster.local
92
+ - --dns-port=10053
93
+ - --config-dir=/kube-dns-config
94
+ - --v=2
95
+ env :
96
+ - name : PROMETHEUS_PORT
97
+ value : " 10055"
98
+ ports :
99
+ - containerPort : 10053
100
+ name : dns-local
101
+ protocol : UDP
102
+ - containerPort : 10053
103
+ name : dns-tcp-local
104
+ protocol : TCP
105
+ - containerPort : 10055
106
+ name : metrics
107
+ protocol : TCP
108
+ volumeMounts :
109
+ - name : kube-dns-config
110
+ mountPath : /kube-dns-config
111
+ - name : dnsmasq
112
+ image : gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.4
113
+ livenessProbe :
114
+ httpGet :
115
+ path : /healthcheck/dnsmasq
116
+ port : 10054
117
+ scheme : HTTP
118
+ initialDelaySeconds : 60
119
+ timeoutSeconds : 5
120
+ successThreshold : 1
121
+ failureThreshold : 5
122
+ args :
123
+ - -v=2
124
+ - -logtostderr
125
+ - -configDir=/etc/k8s/dns/dnsmasq-nanny
126
+ - -restartDnsmasq=true
127
+ - --
128
+ - -k
129
+ - --cache-size=1000
130
+ - --log-facility=-
131
+ - --server=/cluster.local/127.0.0.1#10053
132
+ - --server=/in-addr.arpa/127.0.0.1#10053
133
+ - --server=/ip6.arpa/127.0.0.1#10053
134
+ ports :
135
+ - containerPort : 53
136
+ name : dns
137
+ protocol : UDP
138
+ - containerPort : 53
139
+ name : dns-tcp
140
+ protocol : TCP
141
+ # see: https://github.com/kubernetes/kubernetes/issues/29055 for details
142
+ resources :
143
+ requests :
144
+ cpu : 150m
145
+ memory : 20Mi
146
+ volumeMounts :
147
+ - name : kube-dns-config
148
+ mountPath : /etc/k8s/dns/dnsmasq-nanny
149
+ - name : sidecar
150
+ image : gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.4
151
+ livenessProbe :
152
+ httpGet :
153
+ path : /metrics
154
+ port : 10054
155
+ scheme : HTTP
156
+ initialDelaySeconds : 60
157
+ timeoutSeconds : 5
158
+ successThreshold : 1
159
+ failureThreshold : 5
160
+ args :
161
+ - --v=2
162
+ - --logtostderr
163
+ - --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.cluster.local,5,A
164
+ - --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.cluster.local,5,A
165
+ ports :
166
+ - containerPort : 10054
167
+ name : metrics
168
+ protocol : TCP
169
+ resources :
170
+ requests :
171
+ memory : 20Mi
172
+ cpu : 10m
173
+ dnsPolicy : Default # Don't use cluster DNS.
0 commit comments