On the road again

This article shows how to run tcpdump on a pod`s interface.

 Find the pods unique network interface index inside it's container:

kubectl exec -it keystone-api-755c8dfb6d-8g6c9 -n openstack -- cat /sys/class/net/eth0/iflink

Check on which kubernetes node the pod is running:

kubectl get pods -n openstack -n openstack -o wide

Login to the kubernetes node running the pod and find the tap interface:

ip link | grep 1647

We can use this interface to perform network packet capture:

tcpdump -i cali57b155a7758 -tttt -w tcp.out port 3306
Добавить комментарий