ksniff
ksniff copied to clipboard
Enable simultaneous packet capture of pods given a deployment, daemonset or a service
Allow packet capturing of an entire deployment
or a daemonset
.
# Packet capture an entire daemonset
kubectl sniff [--capture-node-traffic] daemonset/dns -n kube-dns
The command above would find all pods created (owned) by daemonset dns and start tcpdump of all pods, write the output to a local directory. --capture-node-traffic
is an optional flag that also captures the entire node traffic
You can find a POC here that makes use of oc debug
and oc exec
to achieve the same.
@bostrt @eldadru , please feel free to assign this to me if you feel this feature is worth adding.
I think this is a fantastic idea @sthaha. Please let me know if you have any questions during development!
/assign
@MichaelWasher unfortunately no bot here to assign with :) I re-assigned to you manually
@bostrt I wrote some code to work towards this but there needs to be quite a change to the CLI arch so want to have a call to discuss what we should do about this.
I think hooking into the Kubectl libraries to do the resource parsing/extracting and argument parsing will make it feel more like an oc / kubectl command when ksniff is called.