Configuring containerd storage
Platform9 recommends configuring extra storage for /var/lib/containerd directory. This is the location where all the container images and other containerd metadata is stored.
By Default the PMK Nodelet service has the following behaviour when configuring containerd storage on the nodes:
- If
/var/lib/containerd
is already mounted on an additional device, then it uses the same mount point. - if
/var/lib/containerd
is not mounted, then Nodelet looks for local disks of size >= 100 GB on the node.- A disk which is not in use anywhere(not mounted on any path) is looked for and the discovery is stopped as soon as the condition is satisfied and the
/var/lib/containerd
is mounted to that disk.
- A disk which is not in use anywhere(not mounted on any path) is looked for and the discovery is stopped as soon as the condition is satisfied and the
Using specific disk for containerd storage
The above mentioned default behaviour can have some undesired consequences such as:
- If the node has multiple unused disks of size >= 100GB and nodelet can use the unintended one, which was supposed to used for some other purpose.
Following flags can be used to specify the disk to be used:
DISABLE_CONTAINERD_MOUNT
: Disable discovery mechanism for free disks during containerd configuration.- Example: export
DISABLE_CONTAINERD_MOUNT
=true
- Example: export
CONTAINERD_DEVICE
: Specify the device that nodelet should use to mount /var/lib/containerd.- Example: export
CONTAINERD_DEVICE
=/dev/sdc1
- Example: export
The above flags need to be specified in /etc/pf9/kube_override.env
file on every node of the cluster.
Note: If /var/lib/containerd
is already mounted, Nodelet will skip using the configuration present in /etc/pf9/kube_override.env
file.