kubectl run tcpd -it --rm --image=a --overrides='{"spec": {"hostNetwork": true, "containers": [{"name": "tcpd", "image": "corfr/tcpdump", "tty": true, "stdin": true, "stdinOnce": true, "securityContext": {"capabilities": {"add": ["NET_ADMIN"]}}, "args": ["-i", "any", "-U", "-w", "-"]}]}}'
Don't forget that only the DNS names with .local
are forwarded by the sshuttle VPN. If you want e.g. example.com
to be also forwarded to the cluster, you need to add --also-proxy example.com
.
Example:
telepresence --namespace cert-manager --swap-deployment cert-manager --mount=false --run-shell --also-proxy 'example.com'
k krew install sniff
kubectl sniff -n bind bind-79c646f789-vw24n -f "port 53"