-
Notifications
You must be signed in to change notification settings - Fork 715
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
windows: mutate additional kubeletconfiguration fields on join #2967
Comments
@neolit123 could you please add more details like K8s version on which we can reproduce this issue? |
@ndixita this is latest master of k/k. |
Why not just skip or ignore the args on Windows kubelet? Edited: Just read kubernetes/kubernetes#123137. I prefer this change. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
kubernetes/kubernetes#123137 if more fields in kubeletconfig in the future break windows kubelet that's should be fixed in kubelet code like in terms of what we do here: i don't think that can be fixed because client-go/kubelet uses the Abs() golang stdlib function which is not Windows compatible. |
PRs for the points listed below:
during join of a Windows worker node we download the kubelet-config from the cluster as usual, then we apply some mutations, notably around problematic paths with drive on Windows:
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/componentconfigs/kubelet_windows.go
but we are missing some more fields that do not work on Windows.
the kubelet defaults for
EnforceNodeAllocatable=pods
orCgroupsPerQOS=true
are simply rejected on Windows with errors:why are these the defaults, who knows...but that's not OS portable.
what can be done is override the defaults similarly to this:
https://github.com/kubernetes-sigs/sig-windows-tools/blob/28a4c4f4e9e0b65d4d1ed1841e11eca5a62bfafe/hostprocess/PrepareNode.ps1#L73
but using the kubeletconfiguration struct.
https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/
alternatively
we can try convincing the kubelet maintainers to change these defaults on Windows. that is the better solution, but similar requests have failed in the past.
https://github.com/kubernetes/kubernetes/blob/d61cbac69aae97db1839bd2e0e86d68f26b353a7/pkg/kubelet/apis/config/validation/validation_windows.go#L29
https://github.com/kubernetes/kubernetes/blob/d61cbac69aae97db1839bd2e0e86d68f26b353a7/cmd/kubelet/app/options/osflags_windows.go
https://github.com/kubernetes/kubernetes/blob/d61cbac69aae97db1839bd2e0e86d68f26b353a7/pkg/kubelet/apis/config/v1beta1/defaults.go#L148
https://github.com/kubernetes/kubernetes/blob/d61cbac69aae97db1839bd2e0e86d68f26b353a7/pkg/kubelet/apis/config/v1beta1/defaults.go#L245-L246
note, we do not own any tests other than unit tests for this, so best we can do is to just add the change and see if we can remove the flag overrides from https://github.com/kubernetes-sigs/sig-windows-tools/blob/28a4c4f4e9e0b65d4d1ed1841e11eca5a62bfafe/hostprocess/PrepareNode.ps1#L73, which is owned by sig-windows.
The text was updated successfully, but these errors were encountered: