Openrc kubelete service doesn't work out of the box. It's config file /etc/conf.d/kubelete is empty by default and kubelet doesn't start without additional config. /etc/conf.d/kubelete could be changed to something like this: ``` test -f /var/lib/kubelet/kubeadm-flags.env && source /var/lib/kubelet/kubeadm-flags.env command_args="$KUBELET_KUBEADM_ARGS --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --cgroup-driver=cgroupfs --container-runtime-endpoint=unix:///var/run/crio/crio.sock ``` This config contains cri-o specific path, but rest of the arguments allow for bootsraping of a new node, and starting kubelet on already configured node.
```/etc/conf.d/*``` files should contain only variable settings, so I can't use this as is. However, I am open to considering better default settings if you can suggest them. Thanks, William
Created attachment 804523 [details] modified /etc/conf.d/kubelet This init script adds config flags necessary for kubeadm init and kubeadm join.
I've attached modififed init file which moves these variables from /etc/conf.d/kubelet to /etc/init.d/kubelet. I've tested it with this ebuild: https://github.com/adippl/evgr/blob/master/sys-cluster/kubelet/kubelet-
I've been looking into this issue once again. Just adding "--kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml" to command_args should make kubelet work out of the box. I'm attaching a minimal patch which modifies /etc/init.d/kubelet. It's simpler than the last one and allows for cluster bootstraping and normal kubelet start. Please, consider adding it to repo versions of kubelet.
Created attachment 881559 [details, diff] new patch for kubelet.initd