bottlerocket icon indicating copy to clipboard operation
bottlerocket copied to clipboard

Please add `crictl` to make it easy to troubleshoot containers and Pods

Open aaroniscode opened this issue 3 years ago • 1 comments

What I'd like: Please include the crictl command line tool to make it easy to troubleshoot containers and Pods in Kubernetes.

crictl is a command-line interface for CRI-compatible container runtimes. You can use it to inspect and debug container runtimes and applications on a Kubernetes node. crictl and its source are hosted in the cri-tools repository.

The Kubernetes documentation page has a whole section on using crictl for debugging: https://kubernetes.io/docs/tasks/debug-application-cluster/crictl/

Any alternatives you've considered: ctr is available but you have to include a namespace every time and is more cumbersome to use.

aaroniscode avatar Mar 15 '22 21:03 aaroniscode

Note for others if they need crictl to troubleshoot image pulling by installing crictl and geting the parameters right and stumble upon this issue:

https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md#install-crictl

enter-admin-container
sudo yum install tar curl

VERSION="v1.30.0" # check latest version in /releases page
curl -L https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-${VERSION}-linux-amd64.tar.gz --output crictl-${VERSION}-linux-amd64.tar.gz
sudo tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin
rm -f crictl-$VERSION-linux-amd64.tar.gz

time crictl --runtime-endpoint=/.bottlerocket/rootfs/run/dockershim.sock  pull --auth $TOKEN_FROM_AWS_ECR_GET_AUTHORIZATION_TOKEN $IMAGE_NAME

chlunde avatar Jan 15 '25 09:01 chlunde