0

I know where the location is by default which is under /var/lib/kubelet

However I don't want to depend on this knowledge. I'd like to get the location using command line or checking some config file (which hopefully is stored in a more permanent location).

Is there a way to determine where the location is? if indeed changed by the user?

Mark
  • 3,644
  • 6
  • 23
Jeff Saremi
  • 2,674
  • 3
  • 33
  • 57

1 Answers1

1

So it depends how the root-dir parameter was applied to the kubelet:

F.e you should see this in systemctl status kubelet.

Another approach is to search for KubeletRootDir journalctl -u kubelet | grep KubeletRootDir

So please use this approach -root-dir by default = /var/lib/kubelet/

sudo ls -l /root-dir/`kubectl get pod -n mynamespace mypod -o 'jsonpath={.metadata.uid}'`/volumes/kubernetes.io~empty-dir/monted_volume

Hope this help.

Mark
  • 3,644
  • 6
  • 23