What is CRICTL and Why Should You Care?

What is CRICTL and Why Should You Care?

Container Engines are like wheel bearings, you should be able to replace them when they stop working. Also, you shouldn’t have to care about what brand they are. That’s what the Kubernetes Container Runtime Interface (CRI) aims to solve. CRI defines the API used to talk to container engines and all the major container engines support CRI either natively or through what’s called a shim daemon (example – docker shim). The Kublet reaches out to the container engine using the CRI protocol. But, part of getting to this vision means that you need a standard human interface as well. The entire world is used to using Docker – docker ps, docker exec, docker run, etc. To get to a world where the container engine is pluggable, the human interface also needs to be standard. That’s where CRICTL comes in.

 

You probably haven’t heard of CRICTL.” I googled, and there isn’t a single blog entry about it. The closest I could find was a blip in the Kubernetes docs about Debugging Nodes. Finally, I think I can be the first in the world to write about something. Now, I feel special – but, more importantly this project the future of the human interface to the pluggable container engine. I am just the messenger. It’s an a natural extension of the CRI interface, intended for humans to use.

A quick look at some code will show us the subcommands. Things like attach, exec, logs, and info all look pretty familiar. They should remind you of the docker command line interface. That would make sense if this is to replace the docker command line for container engine interaction. You’ll notice one glaring subcommand missing – run. That would make sense, because you should be going to kubectl for that. The CRI interface is more about troubleshooting containers and pods on hosts in your cluster in an emergency situation. During normal operations, you should be leveraging the Kubernetes API.

This is a fast moving space, but I welcome you to the party. If you have a Kubernetes cluster up and running, give CRICTL a test drive. If you are using CRI-O with OpenShift or the Docker Shim,  or containerd you should be in business.

7 comments on “What is CRICTL and Why Should You Care?

Leave a Reply

Your email address will not be published. Required fields are marked *