BUG REPORT
kubeadm version (use kubeadm version):
kubeadm version: &version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.2", GitCommit:"66049e3b21efe110454d67df4fa62b08ea79a19b", GitTreeState:"clean", BuildDate:"2019-05-16T16:20:34Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Environment:
kubectl version): 1.14.2uname -a): Linux stcvl-060.localdomain 3.10.0-862.14.4.el7.x86_64 #1 SMP I used kubernetes 1.9.5, where the config file of kubeadm 10-kubeadm.conf located in
/etc/systemd/system/kubelet.service.d/
However, when upgrading it to 1.14.2 , this config file generated under
/usr/lib/systemd/system/kubelet.service.d/
Is this a design, or is there any changelog or clarification for this change?
user can locate the 10-kubeadm.conf in the given folder
Thanks for reporting this @Cherishty
But in my environment οΌubuntu 18.04οΌ:
10-kubeadm.conf is just in the /etc/systemd/system/kubelet.service.d folder.
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.2", GitCommit:"66049e3b21efe110454d67df4fa62b08ea79a19b", GitTreeState:"clean", BuildDate:"2019-05-16T16:23:09Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.2", GitCommit:"66049e3b21efe110454d67df4fa62b08ea79a19b", GitTreeState:"clean", BuildDate:"2019-05-16T16:14:56Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Can you paste the output of locate 10-kubeadm.conf ?
According to this https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64/repodata/filelists.xml the location was changed from /etc/systemd/system/kubelet.service.d/10-kubeadm.conf to /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf for CentOS rpms starting from kubeadm 1.13.5
@bart0sh much of thanks for your help ~
@SataQiu Yes, 10-kubeadm.conf keeps under /etc for my ubuntu os as well, but only occurs on CentOS
the change was introduced by this commit: https://github.com/kubernetes/release/commit/6968f3b95a57bca804b3cbd1408b8f24d846b431
/usr/lib/systemd/system/kubelet.service.d/ is a better location for systemd drop-in files in my opinion. The question is why it was not changed for Debian/Ubuntu packages.
On Debian/Ubuntu the location should be /lib/systemd/system/kubelet.service.d according to what man systemd.unit suggests:
````
UNIT FILE LOAD PATH
Unit files are loaded from a set of paths determined during compilation, described in the two tables below. Unit files found in directories listed earlier override files with the same name in directories lower in the list.
When the variable $SYSTEMD_UNIT_PATH is set, the contents of this variable overrides the unit load path. If $SYSTEMD_UNIT_PATH ends with an empty component (":"), the usual unit load path will be appended to the contents of the variable.
Table 1. Load path when running in system mode (--system).
ββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
βPath β Description β
ββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β/etc/systemd/system β Local configuration β
ββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β/run/systemd/system β Runtime units β
ββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β/lib/systemd/system β Units of installed packages β
ββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ
````
Most helpful comment
According to this https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64/repodata/filelists.xml the location was changed from /etc/systemd/system/kubelet.service.d/10-kubeadm.conf to /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf for CentOS rpms starting from kubeadm 1.13.5