Why As Kubernetes slowly moves away from Docker, it is important to know a few ctr and crictl commands in order to troubleshoot problems. I have used Docker for over 6 years in production and don't usually need to look up commands like stats, load, save, ps etc. However, without the familiar Docker command line it can be hard to perform these tasks, especially when under pressure debugging a production issue. So I wrote the following shell script hack below. As containerd is name spaced, some commands need to include the namespace k8s.io to provide a useful response. Containerd also knows the concept of pods, so the pause containers are not visible for certain commands. #!/bin/bash ARG=$1 MSG="##### No docker installed, running this for you instead:" case $ARG in info) echo "$MSG ctr version" ctr version ;; ps) echo "$MSG ctr -n k8s.io containers list - or crictl pods" crictl pods ;; rm) echo "$MSG ctr -n k8s.io containers rm
Everything Unix, Cloud and Kubernetes