Knowledge Base Article

Optimizing Containerd Storage in RKE2 (for non-cloud-managed Kubernetes) | [Linux]

Since the Sisense application is using Kubernetes, microservices are deployed as containers that require a specific container runtime. Before L2025.2, the Sisense Kubernetes engine used RKE1, which utilized Docker. Starting from L2025.2, RKE2 is introduced, thus Docker is no longer used, and Containerd serves as a container runtime instead. Over time, unused Containerd objects (images, containers) might accumulate and potentially lead to higher storage consumption. For example, when a new version of Sisense is deployed, old containers and images are not cleaned automatically by RKE2, so manual cleaning can be attempted as part of storage adjustment.

Note: Applicable for L2025.2 and newer (RKE2).

For <L2025.2 (RKE1) instances, please refer to the guide below:

Optimizing Docker Storage | Sisense

Step-by-Step Guide: 

Due to the fact that Containerd is used, the ‘docker’ command is no longer relevant, but ‘crictl’ is used instead.

‘crictl’ is not available in the system PATH by default, so below you will find the steps for ‘crictl’ usage and execution of basic commands for cleaning up the unused objects.

  1. Navigate to rke2 directory:

cd /var/lib/rancher/rke2/

  1. Copy ‘crictl’ binary to the path recognizable by your $PATH variable - in this example, it is ‘/usr/local/bin’ :

Sudo cp bin/crictl /usr/local/bin/

  1. Copy the config file, which is necessary for binary execution,n the/etc directory:

Sudo cp agent/etc/crictl.yaml /etc/

  1. After performing the steps above, you will be able to execute the ‘crictl’ command directly. Execute the following two commands to 1). Remove all stopped (exited) containers and print the result; 2). Remove all unused container images and print the result:

sudo crictl ps -a --state Exited -q| xargs -r sudo crictl rm | wc -l

sudo crictl rmi --prune | wc -l

Conclusion

This article describes the steps for manual cleaning of stopped and unused containers/images in RKE2 deployments in order to release the storage.

References/Related Content 

Optimizing Docker Storage | Sisense

Disclaimer: This post outlines a potential custom workaround for a specific use case or provides instructions regarding a specific task. The solution may not work in all scenarios or Sisense versions, so we strongly recommend testing it in your environment before deployment. If you need further assistance with this, please let us know.

Published 10-30-2025
No CommentsBe the first to comment