Kubeadm: 10-kubeadm.conf located under different folder after upgrade to 1.14

Created on 28 May 2019  Β·  5Comments  Β·  Source: kubernetes/kubeadm

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

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:

  • Kubernetes version (use kubectl version): 1.14.2
  • Cloud provider or hardware configuration: no
  • OS (e.g. from /etc/os-release): CentOS Linux release 7.5.1804 (Core)
  • Kernel (e.g. uname -a): Linux stcvl-060.localdomain 3.10.0-862.14.4.el7.x86_64 #1 SMP
  • Others:

What happened?

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?

What you expected to happen?

user can locate the 10-kubeadm.conf in the given folder

How to reproduce it (as minimally and precisely as possible)?

Anything else we need to know?

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

All 5 comments

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 β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

````

Was this page helpful?
0 / 5 - 0 ratings