(no commit message)
authorstephan48 <stephan48@web>
Sun, 13 Aug 2023 20:07:34 +0000 (22:07 +0200)
committerIkiWiki <ikiwiki.info>
Sun, 13 Aug 2023 20:07:34 +0000 (22:07 +0200)
posts/2023-08-13-k3s-i-want-a-rootless-cluster-with-bgp-damn-it.mdwn

index a8953be2e5d426c0925b8b96b05aa17f8d9d11bd..a50a5087c4d49fd2557e7e979d6bbaf9275a0be1 100644 (file)
@@ -7,10 +7,11 @@ How does k3s setup the network:
 * k3s server is started - calls into rootlesskit https://github.com/k3s-io/k3s/blob/38a0b91c1a917d2866aee265bc7815424af3e701/pkg/rootless/rootless.go#L37
 * k3s server then forks itself(where?) to handle parent(outside netns) and child(inside netns) operations.
 * does not allow us to change from slirp4netns to something else like lxc-nic(easier to patch).
-* Rootlesskit creates external(slirp4netns) process to attach tun interface - https://github.com/rootless-containers/rootlesskit/blob/master/pkg/network/slirp4netns/slirp4netns.go#L176
+* Rootlesskit creates external(slirp4netns) process to attach tap interface - https://github.com/rootless-containers/rootlesskit/blob/master/pkg/network/slirp4netns/slirp4netns.go#L176
   * slirp4netns is called with specific options, theres no intelligent return mechanism for interface config, hence we have to reuse whats there
 * Rootlesskit does child network configuration - https://github.com/rootless-containers/rootlesskit/blob/master/pkg/child/child.go#L156
-  * where does the tap0 device comes from?
+  * where does the tap0 device comes from? https://github.com/rootless-containers/rootlesskit/blob/master/pkg/network/slirp4netns/slirp4netns.go#L182
+  * we will need to remove this and redo some of the network configuration
 
 Wrote slirp4netns wrapper(crude & insecure, will need to harden):
 
@@ -36,5 +37,11 @@ TODO:
 
 * how to handle ipv6?
 * how to conjure all of this securely?
+* what provides dns? 
+  * in slirp4netns?
+  * can i reuse avard-dns? netavard? postman?
+  * resort do dnsmasq?
 
+Interesting Reads:
+  * https://linux-blog.anracom.com/2017/10/30/fun-with-veth-devices-in-unnamed-linux-network-namespaces-i/