fix kubelet service issue on start, add support for kubeadm
-
kubelet service can not start properly because pid folder is missing, thus I make sure it exists in
start_pre()
block in/etc/init.d/kubelet
-
kubelet can be started either using
--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf
or--kubeconfig=/etc/kubernetes/kubelet.conf
but the former flag was missing in/etc/conf.d/kubelet
thus not working withkubeadm
, a popular tool for creating clusters -
and the final fix is sourcing
/var/lib/kubelet/kubeadm-flags.env
in/etc/init.d/kubelet
so we can appendKUBELET_KUBEADM_ARGS
when starting kubelet