eldadru / ksniff

Kubectl plugin to ease sniffing on kubernetes pods using tcpdump and wireshark
Apache License 2.0
3.13k stars 186 forks source link

sniff on RKE2 fails to create the ksniff pod #160

Open ulfaric opened 1 year ago

ulfaric commented 1 year ago

I am trying to do a packet inspection for a pod wit ksniff on RKE2 cluster. The Ksniff always fails to create the pod due to:

MountVolume.SetUp failed for volume "container-socket" : hostPath type check failed: /run/containerd/containerd.sock is not a socket file

I tried --socket /run/k3s/containerd/containerd.sock, still does not work.

ulfaric commented 1 year ago

this is the error when using --socket /run/k3s/containerd/containerd.sock

MHDarkside commented 8 months ago

Hi i have the same issue. And i find the problem. K3s has his ctr not in a path included directory.

for the troubleshooting i just created a link: sudo ln -s /var/lib/rancher/rke2/data/v1.25.13-rke2r1-91117bcc8901/bin/ctr /usr/local/bin/ctr

the path depends on the k3s Version you use. find / -name ctr

hope that helps anybody.