gardener / ops-toolbelt

Useful tools and operations guide for gardener landscapes
Apache License 2.0
15 stars 26 forks source link

Added crictl to work with containerd to the toolbelt #81

Closed ashwani2k closed 2 years ago

ashwani2k commented 2 years ago

What this PR does / why we need it: Adds crictl to the ops toolbelt to help inspect and debug container runtimes and applications on the nodes. https://kubernetes.io/docs/tasks/debug/debug-cluster/crictl/

It provides an alternative to docker cli and a comparison can be found here - https://kubernetes.io/docs/reference/tools/map-crictl-dockercli/

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Release note:

ops-toolbelt now supports crictl as a cli to inspect and debug nodes
petersutter commented 2 years ago

@ashwani2k see comment from @danielfoehrKn https://github.com/gardener/ops-toolbelt/pull/21#issuecomment-871177059

ashwani2k commented 2 years ago

Ooops, should have checked it that it was already discussed and dropped. I'll close this PR.

Btw if you can share what I'm doing wrong.

I tried nerdctl in the ops-pod and somehow it didn't work.

root at ip-10-180-11-204.eu-west-1.compute.internal in /
$ echo $CONTAINERD_ADDRESS
unix:///host/run/containerd/containerd.sock

root at ip-10-180-11-204.eu-west-1.compute.internal in /
$ nerdctl ps 
CONTAINER ID    IMAGE    COMMAND    CREATED    STATUS    PORTS    NAMES
petersutter commented 2 years ago

@ashwani2k check with nerdctl -n k8s.io ps -a

ashwani2k commented 2 years ago

Works thanks, it was there in the usage just overlooked it that we need to explicitly set namespace to k8s.io.