During node install/reinstall there is lot of kubelet.service startup
failure errors occurs. This adds systemd ConditionPathExists to
kubelet.service to prevent kubelet from starting before necessary
configuration files are created during bootstrap of a Kubernetes node
Note:
The kubelet.service requires the following configuration files to
start successfully:
/etc/default/kubelet
/etc/kubernetes/kubelet.conf
/var/lib/kubelet/config.yaml
we are intentionally excluding /etc/kubernetes/kubelet.conf from
this change. This is because during the kubeadm join process, the
kubelet is started before this file is generated. Adding a systemd
condition that checks for the existence of /etc/kubernetes/kubelet.conf
will cause the kubelet to fail to start, resulting in the kubeadm join
command failing due to an unhealthy kubelet.
Test Plan:
PASS: Install ISO as AIO-SX,AIO-DX and Standard, verify
kubelet.service starts properly and start errors are reduced.
PASS: Perform factory install using dc-libvirt and verify
kubelet.service starts properly and start errors are reduced.
Closes-Bug: 2125480
Change-Id: Iaf89ac8f87bf3981d72bf091c53709ebc5f1d72e
Signed-off-by: Boovan Rajendran <boovan.rajendran@windriver.com>