geerlingguy / ansible-role-kubernetes

Ansible Role - Kubernetes
https://galaxy.ansible.com/geerlingguy/kubernetes/
MIT License
549 stars 267 forks source link

Missing `/etc/systemd/system/kubelet.service.d` directory on new installation #158

Open aja114 opened 3 months ago

aja114 commented 3 months ago

I am trying to run the role on a new virtual machine running ubuntu22.04. I am using most of the defaults from the role including the kubernetest_version: 1.25.0. When running the role I obtain the error from this deprecated task that setups the KUBELET_EXTRA_ARGS. I imagine it will be removed soon, but currently the role would not run.

The new installed kubeadm package seem to create the equivalent directory at /lib/systemd/system/kubelet.service.d, maybe that has changed in the recent releases. The solution is to create a symlink from /lib/systemd/system/kubelet.service.d to /etc/systemd/system/kubelet.service.d before running the role.

geerlingguy commented 3 months ago

Thanks! It'll be good to figure out when this change occurred, and if we can just drop support for the old path or have to have some sort of shim for newer versions :/