testing/kubernetes: fix initd & 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.confor--kubeconfig=/etc/kubernetes/kubelet.confbut the former flag was missing in/etc/conf.d/kubeletthus not working withkubeadm, a popular tool for creating clusters -
and the final fix is sourcing
/var/lib/kubelet/kubeadm-flags.envin/etc/init.d/kubeletso we can appendKUBELET_KUBEADM_ARGSwhen starting kubelet