Skip to content

Instantly share code, notes, and snippets.

@alexellis
alexellis / k8s-pi.md
Last active September 24, 2024 14:36
K8s on Raspbian
@mcastelino
mcastelino / tc mirroring.md
Last active October 19, 2024 15:35
Using tc redirect to connect a virtual machine to a container network

Connecting a veth device to tap

  • veth device from CNI/CNM plugin: eth0
  • tap device that connects to the VM: tap0

Redirecting traffic between the two devices

tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: protocol all u32 match u8 0 0 action mirred egress redirect dev tap0