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
bug: kubelet panic & crash if --config-dir
is used
#124796
Comments
/sig node |
I think it is a doc issue for From KEP, it said,
|
Just to be sure I recreated the setup given in the KEP. It did not work. Every file in the drop-ins seems to be required to have a There seems to be something wrong while merging the files. |
yeah the documentation doesn't match the behavior. I think we need to keep the behavior this way, where the kubelet fails on any invalid configuration file, because an admin's intent may not be fulfilled in the resulting configuration if we skip the invalid configs and continue the config resolution without taking the funky one into account. @sohankunkerkar do you have bandwidth to update the docs? |
+1 to what @haircommander said. Let me go ahead and update the docs. |
/triage accepted per #124796 (comment) and #124796 (comment) |
I think in the case/step 2 described above the kubelet should preferably abort like it does in the case/step1 rather than crash with a stacktrace. Perhaps a stretch goal? |
Nice, thanks for updating the docs so fast. Just wanted to check in what's up with problem 2 described in Setup 2. Should this be reopened or is a new Issue needed? |
/reopen For problem 2 described in Setup 2 |
@carlory: Reopened this issue. In response to this:
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-sigs/prow repository. |
/assign @sohankunkerkar |
What happened?
I created a v1.30.0 k8s cluster with kubeadm and created a drop-in directory for kubelet configuration under
/etc/kubernetes/kubelet.conf.d
. The normal conf file created by kubeadm is in/var/lib/kubelet/config.yaml
According to the docs the kubelet should merge all configs in specified order and start. But the kubelet crashes under two setups:
Setup 1:
The
/etc/kubernetes/kubelet.conf.d/20-kubelet.conf
is completely empty the kubelet crashes with:If there is just one space or an newline in that file it crashes with:
Even when the docs say:
If there is nothing or only whitspaces in
/etc/kubernetes/kubelet.conf.d
the merged config should not be invalid and not every file in/etc/kubernetes/kubelet.conf.d
must contain akind
property.Setup 2:
The
/etc/kubernetes/kubelet.conf.d/20-kubelet.conf
is the same as the/var/lib/kubelet/config.yaml
the kubelet panics and crashes with:Using the same config only via
--config
works.What did you expect to happen?
The kubelet should start with empty files in
/etc/kubernetes/kubelet.conf.d
or if the files in/var/lib/kubelet/config.yaml
and/etc/kubernetes/kubelet.conf.d
are the same.If this is not the expected usage, the docs have to be adjusted.
How can we reproduce it (as minimally and precisely as possible)?
Create a cluster with kubeadm v1.30 with kublet config in
/var/lib/kubelet/config.yaml
and/etc/kubernetes/kubelet.conf.d
or setup kubelet by hand.Anything else we need to know?
The kublet conf api version is
apiVersion: kubelet.config.k8s.io/v1beta1
and is was with and without settingKUBELET_CONFIG_DROPIN_DIR_ALPHA
Functionality was introduced in #119390
Kubernetes version
Cloud provider
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
The text was updated successfully, but these errors were encountered: