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 or CgroupsPerQOS=true are simply rejected on Windows with errors:
E1123 02:11:01.358586 5616 server.go:224] "Failed to validate kubelet configuration" err="[invalid configuration: CgroupsPerQOS (--cgroups-per-qos) true is not supported on Windows, invalid configuration: EnforceNodeAllocatable (--enforce-node-allocatable) [pods] is not supported on Windows]" path="&TypeMeta{Kind:,APIVersion:,}"
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/
enforceNodeAllocatable: ""
cgroupsPerQOS: false
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.
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=podsorCgroupsPerQOS=trueare 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.