Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 865505

Summary: sys-cluster/kubelet /etc/conf.d/kubelete could contain more useful default settings
Product: Gentoo Linux Reporter: ev
Component: Current packagesAssignee: William Hubbs <williamh>
Status: UNCONFIRMED ---    
Severity: enhancement CC: leonchik1976
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: modified /etc/conf.d/kubelet
new patch for kubelet.initd

Description ev 2022-08-17 13:56:45 UTC
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.
Comment 1 William Hubbs gentoo-dev 2022-08-27 19:53:33 UTC
```/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
Comment 2 ev 2022-09-10 18:42:58 UTC
Created attachment 804523 [details]
modified /etc/conf.d/kubelet

This init script adds config flags necessary for kubeadm init and kubeadm join.
Comment 3 ev 2022-09-10 18:46:24 UTC
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-
Comment 4 ev 2024-01-06 16:47:05 UTC
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.
Comment 5 ev 2024-01-06 16:47:51 UTC
Created attachment 881559 [details, diff]
new patch for kubelet.initd