soluble-ai / kubetap

Kubectl plugin to interactively proxy Kubernetes Services with ease
https://soluble-ai.github.io/kubetap/
Apache License 2.0
548 stars 44 forks source link

Raw capture #2

Closed Eriner closed 4 years ago

Eriner commented 4 years ago

Feature Description

TCP/UDP capture to pcap.

Potential Solutions

Correct implementation non-trivial, as it involves traffic routing management, potentially modifying the security context to allow capture, and exporting data to the client.

Context

There's already a kubectl plugin for this, but the implementation by uploading binaries into running Pods is not ideal:

ksniff use kubectl to upload a statically compiled tcpdump binary to your pod and redirecting it's output to your local Wireshark for smooth network debugging experience.

That's pretty gross. Because you share the network namespace, it's much cleaner to just run the tap as a sidecar. I'd bet ksniff has some fun process-management code that I wouldn't want to write.

Eriner commented 4 years ago

Closed in favor of #7