Replies: 1 comment 2 replies
-
After writing this up, I realized that there is a way for making this work inside Docker Desktop, however, you'll need to first set up Docker Mac Net Connect. The problem is that by default the Docker Linux VM won't route anything onto the bridge network setup by To get this to work, as Step 0 (i.e. before setting up anything else), do the following:
This will automatically run in the background and set up Wireguard in the Linux VM and will automatically create new routes when new networks are created in Docker. To state the obvious, you don't want to do anything like this in production, but it works reasonably well if you want to use kind instead of the built in Docker Desktop kubernetes. |
Beta Was this translation helpful? Give feedback.
-
Hey everyone! I was going to post this guide to installing on kind in the repo, but thought it would make more sense to kick it off here in the discussion forum for now to get more feedback.
Installing Infra on kind
This guide will show you how to set up kind and Infra on Linux using the Metallb load balancer. Docker Desktop for macOS and Windows both use a virtual machine which runs Linux, and does not directly expose docker's network to the host. Consider using Docker's built-in kubernetes implementation instead of kind if you are using Docker Desktop.
This guide assumes that you have already installed kubectl and docker.
1. Download the latest version of kind
You'll first need to download kind. We'll use one of the pre-compiled binaries, however, you can also follow the kind quickstart guide for alternate methods.
We're assuming that you are using an Intel 64 bit instance, but there are other releases available here.
2. Create a cluster
Once you have the kind binary configured in your path, create your kubernetes cluster using the command:
3. Create a load balancer
Now that your kubernetes cluster is up, we'll install the Metallb load balancer.
You can verify that the load balancer is running with the command:
4. Determine the IP address pool for Docker
We still need to set up the IP address pool which Metallb will use. Since we're using docker, we need to look at the docker networking stack to determine which IP addresses we can use.
This will print out something similar to:
In this case our docker network is set to use
172.19.0.0/16
, however it may be different on your Linux host. We'll configure the load balancer to use IPs in the range172.19.255.200-172.19.255.250
since it's unlikely for Docker to assign any of those IPs to containers.Next, create a ConfigMap called
metallb-configmap.yaml
with IPs in docker's network range. It should look something like:Once you're finished, apply the ConfigMap with the command:
kubectl apply -f metallb-configmap.yaml
5. Follow the rest of the Quickstart guide
The rest of the steps to get Infra connected should be the same as a standard Kubernetes installation. Open up the Quickstart guide and you can complete installing Infra from the section "Install Infra CLI".
Beta Was this translation helpful? Give feedback.
All reactions