<p>I can’t find information about where the pods that run on nodes are stored… I know its temporary file but what if I want them to be created on specific storage or mount point ?</p>

<p>From df -h on one node I can see it mounts:</p>

<pre><code>shm 64M 0 64M 0% /run/k3s/containerd/io.containerd.grpc.v1.cri/sandboxes/a9d11117b319432fff833cda48e5dc16f88bcc28b8e8148077d607ddaf41dfab/shm
overlay 15G 1.9G 12G 14% /run/k3s/containerd/io.containerd.runtime.v1.linux/k8s.io/a9d11117b319432fff833cda48e5dc16f88bcc28b8e8148077d607ddaf41dfab/rootfs
overlay 15G 1.9G 12G 14% /run/k3s/containerd/io.containerd.runtime.v1.linux/k8s.io/ab8b17764bed69e2702565fa171fcc84defcab1de7093bd68f53581732ef39fb/rootfs
overlay 15G 1.9G 12G 14% /run/k3s/containerd/io.containerd.runtime.v1.linux/k8s.io/dc246f55de330a4a0d23da56bf7212008e49fe974302c664b930869544a58051/rootfs
tmpfs 396M 0 396M 0% /run/user/1000
</code></pre>

<p>But where is the setting what root folder it use for that mount… what I want to do is specify for example /cluster_tmp to be the main root for the cluster pods that are deployed on node…</p>

<p>I’m running rpi cluster and would like to use usb3 disk for the storage not the sd card, to lighten the read/writes to the card…</p>

VladoPortos
<p><strong>k3s</strong> stands on the shoulders of giants. As container-runtime it uses <em>containerd</em>.
And <em>containerd</em> gets configured with its own configuration toml. See  <a href="https://manpages.debian.org/experimental/containerd/containerd-config.toml.5.en.html" rel="noreferrer"><code>man 5 containerd-config</code></a>:</p>

<pre><code>root : The root directory for containerd metadata. (Default: "/var/lib/containerd")
</code></pre>

<p>And this is how <code>/etc/containerd/config.toml</code> looks like:</p>

<pre><code>root = "/var/lib/containerd"
state = "/run/containerd"
oom_score = 0
imports = ["/etc/containerd/runtime_*.toml", "./debug.toml"]
[grpc]
...
</code></pre>

<p>The <code>root</code> parameter is the most interesting to you. <a href="https://github.com/containerd/containerd/blob/master/docs/ops.md" rel="noreferrer">Here</a> you can find its description:</p>

<p><code>root</code> will be used to store any type of persistent data for containerd. Snapshots, content, metadata for containers and image, as well as any plugin data will be kept in this location. The root is also namespaced for plugins that containerd loads. Each plugin will have its own directory where it stores data. containerd itself does not actually have any persistent data that it needs to store, its functionality comes from the plugins that are loaded.</p>

<pre><code>/var/lib/containerd/
├── io.containerd.content.v1.content
│   ├── blobs
│   └── ingest
├── io.containerd.metadata.v1.bolt
│   └── meta.db
├── io.containerd.runtime.v1.linux
│   ├── default
│   └── example
├── io.containerd.snapshotter.v1.btrfs
└── io.containerd.snapshotter.v1.overlayfs
    ├── metadata.db
    └── snapshots
</code></pre>
