Open sherif-fanous opened 1 year ago
How did you deal with configuring iptables for custom routes and NATing?
@Slyke I didn't have to do anything. The container handles all this automatically.
@sherif-fanous I'm having a terrible time getting it to route over Kubernetes, lol. Why is /dev/net/tun
required?
@Slyke See the instructions here
I have this setup successfully working in 3 clusters using the instructions in the first post.
First off, thanks for a great solution. It's unfortunate that zerotier don't directly provide/maintain a router based image as Tailscale do.
I managed to get
zerotier:router
running on my home lab K8s cluster.The starter deployment provided in the repo here helped but I believe it could do with a few enhancements along with some documentation.
Here is the deployment manifest I ended up with
The main issue with the deployment in the repo is that it is missing the following
Just adding this to the deployment manifest is not enough though as per https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#enabling-unsafe-sysctls
In my particular case (Cluster created with
kubeadm
), I had to add the following to theKubelet
config file. In my case the config file is/var/lib/kubelet/config.yaml
With this setup the pod is able to set
net.ipv4.ip_forward
to 1 and route traffic between the zerotier network and my K8s overlay pod and service networks.