Set static route on HOST from within Pod

How do I set a static route on the host, from within a Pod?

Ideal scenario:

  1. Run the Pod with special settings.
  2. Pod runs command: ip route add 11.22.33.0/24 via 10.111.222.1
  3. Route is set on host and can be seen in the routing table of the host when running ip route on the host, directly.

You need an agent running in the root netns. Maybe your pod can run as
hostNetwork?

Turns out, setting the route worked with the settings I initially put in the pod spec. Just my test (which did not consist of settings a route, but adding an ip address to an existing host interface) failed and that’s why I thought that it wouldn’t work. However, adding the route to the node worked, as was wished for.

Nonetheless, thank you for your help.