-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deploy our custom coredns addon #17008
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: prezha 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 |
/ok-to-test |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
this seems like a very interesting PR ! couple requests
1- can you plz make sure if user passes
"--disable-optimizations" they will get the Vanilla Kubernetes experience (the real coredns with 2 replica)
2- can we see time to k8s benchmark Before and After this PR on your machine?
It would be good to have these as options to kubeadm eventually, the replicas and records. |
I think it would be a good option to contribution to kubeadm as well maybe after we test it out in minikube |
@medyagh sure:
i've run three full time-to-k8s cycles for both the current minikube version as well as this pr - results: before - current release v1.31.1:
after - this pr [8de8137]:
details: |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@prezha the PR commenter bechnmarking doesnt not seem to show much difference how much does this make minikube faster? |
|
||
const ( | ||
// CoreDNSService is the CoreDNS Service manifest | ||
CoreDNSService = ` |
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.
@prezha one problem I feel like might happen, how do we generate this yaml file and with future kubernetes versions is it gonna change this yaml and we will need to remember to regenrate it ? is there an automated way of generating this to future proof it ?
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.
and also if user chooses an older kubernetes we wanna make sure this yaml works there too or we could use the Old way for Non-Default Kubernets version (the latest that runs by default)
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.
@medyagh i thought about and accounted for that:
based on the history of changes, in the past 2+ years, there were no frequent or significant changes to the kubeadm's embedded coredns deployment manifest, which is well over our target extended support policy of last 6 minor versions
based on this, we do not have an automated way to update coredns manifest atm, but i intentionally made it in diff-friendly format so it would be straight-forward finding any differences and upgrade if/when needed in the future - namely:
- minikube's coredns: https://github.com/kubernetes/minikube/blob/8de81377cf7b0f8f4f5586fc099dc6812fe2ec91/pkg/minikube/bootstrapper/kubeadm/dns/coredns.go
- kubeadm's coredns: https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/phases/addons/dns/manifests.go
this would be the default behaviour, and should a user want/need to use the old way - they can do so just by using the --disable-optimizations
flag
last but not least, as a potential next step, with this "separation", we could relatively easily enable users to provide their own coredns manifest (we'd still need eg, to patch it to inject ip address of host.minikube.internal that's only known during the runtime)
|
||
const ( | ||
// CoreDNSService is the CoreDNS Service manifest | ||
CoreDNSService = ` |
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.
and also if user chooses an older kubernetes we wanna make sure this yaml works there too or we could use the Old way for Non-Default Kubernets version (the latest that runs by default)
hey @medyagh, i didn't expect to see any noticeable speed improvement, as the interventions on the originally deployed (embedded) coredns config we are currently doing are usually of sub-second duration (eg, scaling replica count down or patching hosts block in configmap to include the host.minikube.internal record) |
i think this is still under consideration /remove-lifecycle stale |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
kvm2 driver with docker runtime
Times for minikube start: 47.9s 51.4s 52.4s 52.7s 49.7s Times for minikube ingress: 24.1s 26.2s 24.1s 26.6s 27.1s docker driver with docker runtime
Times for minikube ingress: 21.8s 19.8s 20.3s 20.9s 19.3s Times for minikube start: 22.2s 22.7s 25.6s 22.6s 26.5s docker driver with containerd runtime
Times for minikube start: 23.5s 21.6s 22.3s 23.9s 24.8s Times for minikube ingress: 35.8s 30.8s 46.8s 30.8s 46.8s |
These are the flake rates of all failed tests.
Too many tests failed - See test logs for more details. To see the flake rates of all tests by environment, click here. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
fixes: #17007
instead of using the embedded kubeadm coredns manifests, then scale down from 2 to 1 replica and finally patching the configmap to inject {"host.minikube.internal": hostIP} record, which in turn, will also cause coredns to reload, because the reload plugin is used by default
we can skip the default coredns deployment and deploy our own variant
ref: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/control-plane-flags/
this pr creates custom coredns addon based on the "original" one that kubeadm deploys by default and, luckily, it's not changed too frequently, so it should not be too hard to maintain the sync
ref: https://github.com/coredns/deployment/tree/master/kubernetes#kubernetes---deprecated
note 1:
--disable-optimizations
minikube flag will disable this behaviour and will fallback to using default kubeadm coredns manifestsnote 2: once kubernetes/kubeadm#1318 is merged, we'll have an option to handle upgrades as well, should we need it