1. Install Local Kubernetes
Please refer to their installation guide for how to download and install it (which is a pretty simple process).
Note: If you have an older version installed, you may need to update it in order to enable Kubernetes support.
Once installed, open Docker Desktop's preferences, go to the Kubernetes section, tick
Enable Kubernetesand save.
Once installed, you need to add the
microk8sconfiguration to your
~/.kube/configso that Garden knows how to access your cluster. We recommend exporting the config like this:
microk8s config > $HOME/.kube/microk8s.config
And then adding this to your
You also need to ensure microk8s commands can be run by the user that's running Garden, so that Garden can get its status and enable required extensions if necessary. To do this, add your user to the
sudo usermod -a -G microk8s $USER # or replace $USER with the desired user, if it's not the current user
Note that in-cluster building is currently not supported with microk8s clusters.
You may also want to install a driver to run the Minikube VM. Please follow the instructions here and note the name of the driver you use. The driver you choose will likely vary depending on your OS/platform. We recommend hyperkit for macOS and kvm2 on most Linux distributions.
Once Minikube and the appropriate driver for your OS are installed, you can start Minikube by running:
minikube start --vm-driver=<your vm driver> # e.g. hyperkit on macOS
kindwith Garden you may need to start your cluster with extra port mappings to allow ingress controllers to run (see their docs for more info):
cat <<EOF | kind create cluster --config=-
- role: control-plane
- containerPort: 80
- containerPort: 443
Alternatively, if you don't need an ingress controller, you can set
setupIngressController: nullin your
local-kubernetesprovider configuration and start the cluster without the above customization.
Note that in-cluster building is currently not supported with kind clusters.