How to configure root-dir for kubelet

Hi there,

I’m using charmed kubernetes 1.21.4 (kubernetes-worker 788) on focal. How can I set up “root-dir” for kubelet on workers? Default path is /var/lib/kubelet. Based on offical docs I tried to use:

juju config kubernetes-worker kubelet-extra-config="{root-dir: /data/kubelet/}"


juju config kubernetes-worker kubelet-extra-config="{extra_args: {root-dir: “/data/kubelet”}}"

but despite command wrote the extra argument to /root/cdk/kubelet/config.yaml to all workers even after reboot of a machine extra argument was not applied and data are still placed to default dir. I’m also found out, that in upstream docs there is no mention about extra-arg “root-dir”.

Is there needed to redeploy the bundle from ground?

I’m aware about solution using symlink from default to target dir.

Thank you

UPDATE: I’m using Juju 2.9.12