https://rancher.com/ logo
Title
r

rough-farmer-49135

02/24/2023, 2:53 AM
I know with RKE2 sometimes you can query some items with crictl (I think it's the static pods only). Does K3D run anything with crio such that it could be queried with crictl too?
c

creamy-pencil-82913

02/24/2023, 3:18 AM
everything running in containerd is visible with crictl. so, all pods.
r

rough-farmer-49135

02/24/2023, 12:22 PM
Can I get to crictl from the host of k3d, though? When I try pointing to the host's /run/containerd/containerd.sock it says no dice and there isn't a /run/k3s/containerd/containerd.sock on the host (and it's a tmpfs inside the container so I can't just inspect & find the volume). Also with ctr I don't see the k8s.io namespace (just a moby namespace). I guess I'd have to attach to the running docker container for the k3s server to use crictl there?
c

creamy-pencil-82913

02/24/2023, 5:52 PM
each individual k3s node running inside k3d has its own separate containerd socket that you would have to get at
r

rough-farmer-49135

02/24/2023, 5:53 PM
Yeah, that's what I figured and I'm not seeing a way to do so. I think this would've been solvable if I were using K3S installed locally or RKE2 instead of K3D.
Perhaps @wide-garage-9465 might know if there's a good method to get at that inside the container?
...actually just found it and I had what I needed in notes from my last job I can't get to now I realize... I can use
docker exec -it k3d-${CLUSTER_NAME}-server-0 sh
and run crictl from inside the cluster that way. I'm fairly certain the /run tmpfs inside each container doesn't get exported out to the host the way the rest of the file systems do.
Thanks @creamy-pencil-82913 , I think this one's solved.
­čÜÇ 1