-
Hi! I'm using Lima with the docker flavor so that I can spawn KinD clusters. That is already awesome!! 🎉 In Kubernetes, when I create some services type LoadBalancer, I get an external IP, thanks to MetalLB. limactl shell
curl 172.18.1.1 Plus, the connection to the docker daemon from my laptop is working fine: Now, I would like to access these Kubernetes services from the host, my MacBook. My question: what would be the next steps to have, let's say the subnet I've been quickly looking at https://github.com/lima-vm/lima/blob/master/docs/network.md and https://github.com/lima-vm/vde_vmnet but I'm lost! :-) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
@bcollard Check this out. this may help lima-vm/vde_vmnet#19 (comment) |
Beta Was this translation helpful? Give feedback.
-
Quick intermediate update: So, now I have a bridge network between my host and the Lima VM. Now, I can ping machines in both directions 👍 (Host to VM, VM to Host) On my host, I've added this route I'll take a look at this comment lima-vm/vde_vmnet#19 (comment) later today |
Beta Was this translation helpful? Give feedback.
-
The last piece I was missing is about IP packet forwarding on the Lima VM: BRIDGE_NET=$(ip -o link show | awk -F': ' '{print $2}' | grep "br-")
SRC_IP=192.168.105.1
DST_NET=172.18.0.0/16
sudo iptables -t filter -A FORWARD -4 -p tcp -s ${SRC_IP} -d ${DST_NET} -j ACCEPT -i lima1 -o ${BRIDGE_NET} Result: from my MacBook, I can run docker commands and I can spin up multiple KinD clusters. In these k8s clusters, I can create Services type LoadBalancer and access them from my MacBook. Big kudos to the contributors for this nice project! ❤️ |
Beta Was this translation helpful? Give feedback.
The last piece I was missing is about IP packet forwarding on the Lima VM:
Result: from my MacBook, I can run docker commands and I can spin up multiple KinD clusters. In these k8s clusters, I can create Services type LoadBalancer and access them from my MacBook.
I'll blog about it.
Big kudos to the contributors for this nice project! ❤️