-
Notifications
You must be signed in to change notification settings - Fork 558
Kubernetes: bring kube-dns implementation up-to-date #3373
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jackfrancis The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@feiskyer @andyzhangx FYI, testing new exechealthz on v1.11 clusters. Any reasons that you're aware of to backport this update for earlier cluster versions? (Or are there any reasons why not to move forward w/ new exechealthz version?) |
Codecov Report
@@ Coverage Diff @@
## master #3373 +/- ##
==========================================
- Coverage 55.49% 55.45% -0.05%
==========================================
Files 105 105
Lines 16038 16041 +3
==========================================
- Hits 8900 8895 -5
- Misses 6386 6394 +8
Partials 752 752 |
@jackfrancis kube-dns has moved to sidecar container for health checking since kubernetes/kubernetes#38992 (v.1.6.0). I suggest we also use it (e.g. k8s.gcr.io/k8s-dns-sidecar-amd64:1.14.10) for our cluster. |
f50d8ca
to
02be0bd
Compare
Reference for v1.11 kube-dns changes: |
@feiskyer thanks for the nudge here! See my changes in the file |
@@ -146,6 +146,8 @@ spec: | |||
- mountPath: /kube-dns-config | |||
name: kube-dns-config | |||
- args: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
healthz container should be removed, as sidecar container has been added below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also deployed with https://github.com/kubernetes/kubernetes/blob/v1.11.0/cluster/addons/dns/kube-dns/kube-dns.yaml.base, it works well with acs-engine deployed cluster (v1.11.0).
@feiskyer Thanks for the continued guidance! I've converted the 1.11 kube-dns implementation here to follow the base kubernetes example. Initial tests suggest that HPA is failing, but everything else in our test surface area checks out. Does anything look suspicious here that would break HPA? |
@jackfrancis Did you mean HPA for other pods or dns-horizontal-autoscaler for kube-dns? The change doesn't seem related with HPA for other pods. |
@FeiSker just regular HPA. We test deploying nginx, attaching HPA config to it, and then hitting with load. |
Have you checked HPA events? It should include some hints, e.g.
|
@feiskyer so, a follow-up run had different side-effects. I observed See:
and:
|
- -k | ||
- --cache-size=1000 | ||
- --no-negcache | ||
- --log-facility=- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing --server=/cluster.local/127.0.0.1#10053
here?
It works fine on my cluster after adding |
That worked @feiskyer, thank you! The changes here are only for 1.11. Do you recommend doing a similar kube-dns conversion for any other k8s versions? |
44693f6
to
342a7ee
Compare
@feiskyer for your review. I audited the k8s codebase and determined that the sidecar implementation has been in place since 1.7 (at least, I didn't check earlier). To be conservative, and with the prediction that there are more clusters on 1.8 and below in the wild (1.8 is the default when none is provided), I have converted 1.9 and above to adhere to an implementation that looks like the upstream base example. Thoughts? Any reservations about these changes? Thanks again for your eyes! |
and clean up tests
I'm also suggesting this, so we're consistent with upstream. |
What this PR does / why we need it: Basing kube-dns implementation on the kubernetes-recommended base configs.
Primary change is to replace exechealthz with sidecar. Additionally added
--no-negcache
config to dnsmasq.As a reference, here are the base configs.
For v1.11:
https://github.com/kubernetes/kubernetes/blob/v1.11.0/cluster/addons/dns/kube-dns/kube-dns.yaml.base
For v1.10:
https://github.com/kubernetes/kubernetes/blob/v1.10.0/cluster/addons/dns/kube-dns.yaml.base
For v1.9:
https://github.com/kubernetes/kubernetes/blob/v1.9.0/cluster/addons/dns/kube-dns.yaml.base
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #3534 fixes #2999Special notes for your reviewer:
If applicable:
Release note: