Start with the following guide to setup pre-requisites:
Setup-Guide-for-Kubernetes-Developers
Skip the kubernetes steps from the guide above if you don't plan on doing any development for kubernetes projects.
cri-tools need the following dependencies installed for a development environment:
Important Note: Go dependencies tend to follow the GitHub project URL path structure, i.e. when installing and trying to use cri-tools locally, it should be installed under a folder structure as follows go/src/sigs.k8s.io/cri-tools. Kubernetes is the only exception which does not follow this structure for legacy reasons.
Ensure the following after following the setup:
There is a go directory within $HOME and the go/bin binary is a part of your $PATH environment variable
$ ls $HOME go $ echo $PATH | grep go PATH=$PATH:/usr/local/go/bin:$HOME/go/bin # $PATH here refers to truncated version of additional `env` paths that are unrelated this guide / setup
containerd/criThe latest development version of containerd or CRI-O is required.
This guide will use containerd/cri as the container runtime. You may use CRI-O instead but you may need some additional steps to ensure it works. You can also follow the CRI-O install guide if you prefer to use the packaged version.
Follow the containerd/cri dev guide to make and install the containerd/cri runtime.
cri-toolsYou can build and install cri-tools as follows:
Install dependencies:
$ make install.tools
Build cri-tools (critest and crictl) and install to common location:
$ make && make install # prefix sudo if run into permissions issues
If all goes well at this point you should be able to check for critest and crictl binaries
$ which crictl /usr/local/bin/crictl $ which critest /usr/local/bin/critest