Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Kubelet RPM upgrade overwrites /etc/sysconfig/kubelet #70489
When updating the kubelet RPM from 1.11.3-0.x86_64 to 1.11.4-0.x86_64,
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Install Kubelet on CentOS:
Anything else we need to know?:
I was about to open a ticket, but I think I'll pile onto this one. I have the exact same issue, but for /etc/default/kubelet on Debian based systems. According to the systemd drop-in:
But I can't use it for overrides if it can get overwritten anytime the kubelet package is updated.
$ dpkg -L kubelet /. /etc /etc/default /etc/default/kubelet /usr /usr/bin /usr/bin/kubelet /lib /lib/systemd /lib/systemd/system /lib/systemd/system/kubelet.service
In systemd Environment can't override the same variable in an EnvironmentFile, the workaround is to create a systemd drop-in with another EnvironmentFile:
$ cat /usr/lib/systemd/system/kubelet.service.d/20-containerd.conf [Service] EnvironmentFile=-/usr/etc/kubelet $ cat /usr/etc/kubelet KUBELET_EXTRA_ARGS=--container-runtime=remote --container-runtime-endpoint=unix:///var/run/containerd/containerd.sock --runtime-request-timeout=15m
I find it odd that the kubelet package is doing this https://github.com/kubernetes/release/blob/master/debian/xenial/kubelet/debian/kubelet.install#L3.
I think it makes more sense for that to happen in the kubeadm package, and then, only if the file doesn't exist I think. I have to think about the various scenarios, but I think it's sensible to not have the kubelet writing the /etc/default/kubelet file.
I don't think it should be in the kubeadm package either. Systemd doesn't require it to be there and its supposed to be a user supplied file. Having kubernetes create/supply it would cause difficulties/conflicts with users including it in their own deb file or when creating it dynamically via their provisioning scripts.