eldadru / ksniff

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

k3d containerd error on priviledge pod startup #115

Open tibbon opened 3 years ago

tibbon commented 3 years ago

When I run:

kubectl sniff any-pod -n default -f "port 8000" -p --pod-creation-timeout 600s

I'm seeing this error in the pod description:

Events:
  Type     Reason       Age                From     Message
  ----     ------       ----               ----     -------
  Warning  FailedMount  21s (x7 over 52s)  kubelet  MountVolume.SetUp failed for volume "container-socket" : hostPath type check failed: /run/containerd/containerd.sock is not a socket file

I believe this is because I'm running in a k3d cluster that uses Containerd instead of Docker.

bostrt commented 3 years ago

Can you try running ksniff including this argument: --socket /run/k3s/containerd/containerd.sock

TomyLobo commented 2 years ago

For the record: I had the same error on k3os and found that socket using find / -type s. passing the suggested flag solved this issue for me. I'm having other issues, though :)