Running a node-level binary against a specific pod’s container — Linux and Windows
Hi all,
I want to run a command/binary that exists on the node (not inside the container image) but have it operate in the context of a specific pod’s container — e.g., use the node’s tcpdump to capture traffic on a pod’s network interface, or run a diagnostic tool that isn’t shipped in the container.
On Linux, I know nsenter -t <pid> -n … works for this by entering the container’s namespaces while still executing the node’s binary. Is this the recommended approach, or is there something cleaner (e.g., kubectl debug, ephemeral containers)?
On Windows, nsenter doesn’t exist since containers use Job Objects / Server Silos instead of Linux namespaces. What’s the equivalent pattern for running a node-installed tool against a specific pod’s container?
Thanks!