@@ -96,124 +96,124 @@ write-files:
96
96
- name: dns-tcp
97
97
port: 53
98
98
protocol: TCP
99
-
100
99
---
101
-
102
- apiVersion: v1
103
- kind: ReplicationController
100
+ apiVersion: extensions/v1beta1
101
+ kind: Deployment
104
102
metadata:
105
- name: kube-dns-v11
103
+ name: kube-dns-v20
106
104
namespace: kube-system
107
105
labels:
108
106
k8s-app: kube-dns
109
- version: v11
107
+ version: v20
110
108
kubernetes.io/cluster-service: "true"
111
109
spec:
110
+ strategy:
111
+ type: RollingUpdate
112
+ rollingUpdate:
113
+ # Ensure we have at least 1 alive pod during update (don't kill old pod until new pod is up and running)
114
+ maxSurge: 1
115
+ maxUnavailable: 0
112
116
replicas: 1
113
117
selector:
114
- k8s-app: kube-dns
115
- version: v11
118
+ matchLabels:
119
+ k8s-app: kube-dns
120
+ version: v20
116
121
template:
117
122
metadata:
118
123
labels:
119
124
k8s-app: kube-dns
120
- version: v11
121
- kubernetes.io/cluster-service: "true"
125
+ version: v20
126
+ annotations:
127
+ scheduler.alpha.kubernetes.io/critical-pod: ''
128
+ scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
122
129
spec:
123
130
containers:
124
- - name: etcd
125
- image: gcr.io/google_containers/etcd:2.2.1
126
- resources:
127
- # keep request = limit to keep this container in guaranteed class
128
- limits:
129
- cpu: 100m
130
- memory: 50Mi
131
- requests:
132
- cpu: 100m
133
- memory: 50Mi
134
- command:
135
- - /usr/local/bin/etcd
136
- - -data-dir
137
- - /var/etcd/data
138
- - -listen-client-urls
139
- - http://127.0.0.1:2379,http://127.0.0.1:4001
140
- - -advertise-client-urls
141
- - http://127.0.0.1:2379,http://127.0.0.1:4001
142
- - -initial-cluster-token
143
- - skydns-etcd
144
- volumeMounts:
145
- - name: etcd-storage
146
- mountPath: /var/etcd/data
147
- - name: kube2sky
148
- image: gcr.io/google_containers/kube2sky:1.14
131
+ - name: kubedns
132
+ image: gcr.io/google_containers/kubedns-amd64:1.8
149
133
resources:
150
- # keep request = limit to keep this container in guaranteed class
134
+ # TODO: Set memory limits when we've profiled the container for large
135
+ # clusters, then set request = limit to keep this container in
136
+ # guaranteed class. Currently, this container falls into the
137
+ # "burstable" category so the kubelet doesn't backoff from restarting it.
151
138
limits:
152
- cpu: 100m
153
- memory: 50Mi
139
+ memory: 170Mi
154
140
requests:
155
141
cpu: 100m
156
- memory: 50Mi
157
- args:
158
- # command = "/kube2sky"
159
- - --domain=%K8S_DOMAIN%
160
- - name: skydns
161
- image: gcr.io/google_containers/skydns:2015-10-13-8c72f8c
162
- resources:
163
- # keep request = limit to keep this container in guaranteed class
164
- limits:
165
- cpu: 100m
166
- memory: 50Mi
167
- requests:
168
- cpu: 100m
169
- memory: 50Mi
170
- command: ["sh", "-c", "while true; do echo -e \"PUT /v2/keys/skydns/config HTTP/1.1\r\nAccept: */*\r\nContent-Length: 26\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\nvalue=%7B%22ndot%22%3A1%7D\" | nc localhost 2379 2>&1 | grep 'HTTP/1.1 200 OK' && /skydns --machines=http://127.0.0.1:2379 --addr=0.0.0.0:53 --ns-rotate=false --domain=%K8S_DOMAIN%. ; sleep 1; done"]
171
- # args:
172
- # # command = "/skydns"
173
- # - --machines=http://127.0.0.1:2379
174
- # - --addr=0.0.0.0:53
175
- # - --ns-rotate=false
176
- # - --domain=%K8S_DOMAIN%.
177
- ports :
178
- - containerPort : 53
179
- name : dns
180
- protocol : UDP
181
- - containerPort : 53
182
- name : dns-tcp
183
- protocol : TCP
142
+ memory: 70Mi
184
143
livenessProbe:
185
144
httpGet:
186
- path : /healthz
145
+ path: /healthz-kubedns
187
146
port: 8080
188
147
scheme: HTTP
189
- initialDelaySeconds : 30
148
+ initialDelaySeconds: 60
190
149
timeoutSeconds: 5
150
+ successThreshold: 1
151
+ failureThreshold: 5
191
152
readinessProbe:
192
153
httpGet:
193
- path : /healthz
154
+ path: /readiness
155
+ port: 8081
156
+ scheme: HTTP
157
+ # we poll on pod startup for the Kubernetes master service and
158
+ # only setup the /readiness HTTP server once that's available.
159
+ initialDelaySeconds: 3
160
+ timeoutSeconds: 5
161
+ args:
162
+ # command = "/kube-dns"
163
+ - --domain=%K8S_DOMAIN%.
164
+ - --dns-port=10053
165
+ ports:
166
+ - containerPort: 10053
167
+ name: dns-local
168
+ protocol: UDP
169
+ - containerPort: 10053
170
+ name: dns-tcp-local
171
+ protocol: TCP
172
+ - name: dnsmasq
173
+ image: gcr.io/google_containers/kube-dnsmasq-amd64:1.4
174
+ livenessProbe:
175
+ httpGet:
176
+ path: /healthz-dnsmasq
194
177
port: 8080
195
178
scheme: HTTP
196
- initialDelaySeconds : 1
179
+ initialDelaySeconds: 60
197
180
timeoutSeconds: 5
181
+ successThreshold: 1
182
+ failureThreshold: 5
183
+ args:
184
+ - --cache-size=1000
185
+ - --no-resolv
186
+ - --server=127.0.0.1#10053
187
+ - --log-facility=-
188
+ ports:
189
+ - containerPort: 53
190
+ name: dns
191
+ protocol: UDP
192
+ - containerPort: 53
193
+ name: dns-tcp
194
+ protocol: TCP
198
195
- name: healthz
199
- image : gcr.io/google_containers/exechealthz:1.0
196
+ image: gcr.io/google_containers/exechealthz-amd64 :1.2
200
197
resources:
201
- # keep request = limit to keep this container in guaranteed class
202
198
limits:
203
- cpu : 10m
204
- memory : 20Mi
199
+ memory: 50Mi
205
200
requests:
206
201
cpu: 10m
207
- memory : 20Mi
202
+ # Note that this container shouldn't really need 50Mi of memory. The
203
+ # limits are set higher than expected pending investigation on #29688.
204
+ # The extra memory was stolen from the kubedns container to keep the
205
+ # net memory requested by the pod constant.
206
+ memory: 50Mi
208
207
args:
209
- - -cmd=nslookup kubernetes.default.svc.%K8S_DOMAIN% 127.0.0.1 >/dev/null
210
- - -port=8080
208
+ - --cmd=nslookup kubernetes.default.svc.%K8S_DOMAIN% 127.0.0.1 >/dev/null
209
+ - --url=/healthz-dnsmasq
210
+ - --cmd=nslookup kubernetes.default.svc.%K8S_DOMAIN% 127.0.0.1:10053 >/dev/null
211
+ - --url=/healthz-kubedns
212
+ - --port=8080
213
+ - --quiet
211
214
ports:
212
215
- containerPort: 8080
213
216
protocol: TCP
214
- volumes :
215
- - name : etcd-storage
216
- emptyDir : {}
217
217
dnsPolicy: Default # Don't use cluster DNS.
218
218
- path : /etc/kubernetes/manifests/kube-apiserver.yaml
219
219
permissions : ' 0644'
0 commit comments