Thursday, October 29, 2020

Sniffing pod's traffic on openshift

# get worker node name

oc get pod -o wide

# get container id
oc get pod <podname> |grep -i containerid

# login to worker node

# get pid by using container-id
docker inspect <container-id> |grep -i pid

# use namespace enter -t <pid> and run tcpdump command.

nsenter -t 1234 -n tcpdump -nnvv -i eth0 port 3128

No comments:

Post a Comment