K3s: Move Data Folder
janusworx.com·4h
Flag this post


Problem

My main SSD is to small to hold all my kubernetes and K3s shenanigans. (It’s only about 512gb) So I need a way to move my K3s data folder out to my big HDD.

Caution!

Before you do any of the following, make sure to stop the cluster with: sudo systemctl stop k3s

Solution

K3s supports having acustom data directory, by letting me specify a data-dir. I decided to specify it in the K3s config file at /etc/rancher/k3s/config. If it isn’t there (as it wasn’t in my case), just create one. You’ll need to do this as the root user. This is what I now have in there.

data-dir: /BIGHDD/rancher/k3s

And then, I …

  1. Created a rancher directory in my …

Similar Posts

Loading similar posts...