Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I haven't used it, but doesn't this suit the average usecase?

https://www.cni.dev/plugins/main/macvlan/

Basically just do normal ipv4 via your dhcp server rather than an overlay.

-- Edit

For arguments sake, I just set this up:

root@nas:/opt/cni/bin# ./dhcp daemon

cat /etc/cni/net.d/01-macvlan.conf { "name": "mynet", "type": "macvlan", "master": "eno1", "ipam": { "type": "dhcp", "routes": [{ "dst": "192.168.1.0/24"}] } }

PODIP = 192.168.1.181:8096

Works in my browser; so routes correctly.

Got its dhcp from my pihole.



This is super useful for home networks, I do this for my k8s cluster hosted by a bunch of pi's.

But in production, I'd rather my ability to launch a new pod not be dependent on a DHCP server being reachable and functional. In that case, this particular trick is rather neat, since assignment of IP addresses is fully static/local (without having to agree upfront what range of IPs each node can use for bringing pods online), while retaining the benefit of everything being directly routable. You can now also run a ridiculous amount of pods on a single node.


Yeah, I don't do this in production.

Though to counter your point, you don't actually need to use an external DHCP server in my example either, you can just define the block you're giving the server via the macvlan/ipvlan plugin, and I presume, again, it works with both IPV4 or IPV6.

So I guess my wider point is, k8s probably doesn't need to replaced to have the networking work how you like.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: