LogoLogo
Bonsai (0.13) DocsGitHubDiscord CommunityGarden Enterprise
Acorn (0.12)
Acorn (0.12)
  • Welcome!
  • 🌳Basics
    • How Garden Works
    • Quickstart Guide
    • The Stack Graph (Terminology)
  • 🌻Tutorials
    • Your First Project
      • 1. Initialize a Project
      • 2. Connect to a Cluster
      • 3. Deploy and Test
      • 4. Configure Your Project
  • 💐Using Garden
    • Configuration Overview
    • Projects
    • Modules
    • Services
    • Tests
    • Tasks
    • Workflows
    • Variables and templating
    • Module Templates
    • Using the CLI
  • 🌿Kubernetes Plugins
    • About
    • Remote K8s Plugin Configuration
      • 1. Create a Cluster
        • AWS
        • GCP
        • Azure
      • 2. Configure Container Registry (Optional)
        • AWS
        • GCP
        • Azure
      • 3. Set Up Ingress, TLS and DNS
      • 4. Configure the Provider
    • Local K8s Plugin Configuration
      • 1. Install Local Kubernetes
      • 2. Configure the Provider
    • Module Configuration
      • Container
      • Kubernetes
      • Helm
      • PersistentVolumeClaim
      • ConfigMap
    • Advanced
      • In-Cluster Building
      • Minimal RBAC Configuration for Development Clusters
      • Deploying to Production
  • 🌺Terraform Plugin
    • About
    • Provider Configuration
    • Module Configuration
  • ☘️Pulumi Plugin
    • About
    • Provider Configuration
    • Module Configuration
  • 🌹Other Plugins
    • Container
    • Exec (local scripts)
  • 🌼Guides
    • Installing Garden
    • Adopting Garden
    • Code Synchronization (Dev Mode)
    • Connecting a local service to a K8s cluster (Local Mode)
    • Environments and namespaces
    • Hot Reload
    • Migrating from Docker Compose to Garden
    • Using Garden in CI
  • 🌷Advanced
    • cert-manager Integration
    • Using Remote Sources
    • Custom Commands
  • 🪷Reference
    • Providers
      • conftest-container
      • conftest-kubernetes
      • conftest
      • container
      • exec
      • hadolint
      • jib
      • kubernetes
      • local-kubernetes
      • maven-container
      • octant
      • openfaas
      • pulumi
      • terraform
    • Module Types
      • configmap
      • conftest
      • container
      • exec
      • hadolint
      • helm
      • jib-container
      • kubernetes
      • maven-container
      • openfaas
      • persistentvolumeclaim
      • pulumi
      • templated
      • terraform
    • Template Strings
      • Project configuration context
      • Environment configuration context
      • Provider configuration context
      • Module configuration context
      • Remote Source configuration context
      • Project Output configuration context
      • Custom Command configuration context
      • Workflow configuration context
      • Template Helper Functions
    • Glossary
    • Commands
    • Project Configuration
    • Module Template Configuration
    • Workflow Configuration
  • 🎋Misc
    • FAQ
    • Troubleshooting
    • Telemetry
Powered by GitBook
On this page
  • Docker Desktop
  • MicroK8s
  • Minikube
  • kind

Was this helpful?

  1. Kubernetes Plugins
  2. Local K8s Plugin Configuration

1. Install Local Kubernetes

PreviousLocal K8s Plugin ConfigurationNext2. Configure the Provider

Last updated 1 year ago

Was this helpful?

Docker Desktop

is our recommended option for local Kubernetes on Mac and Windows.

Please refer to their 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 Kubernetes and save.

MicroK8s

Garden can be used with on supported Linux platforms.

To install it, please follow .

Once installed, you need to add the microk8s configuration to your ~/.kube/config so 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 .bashrc/.zshrc:

export KUBECONFIG=$HOME/.kube/microk8s.config:${KUBECONFIG:-$HOME/.kube/config}

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 microk8s group:

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.

Minikube

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
  1. Make sure Minikube is running by typing minikube start

  2. Then run minikube addons configure registry-creds

  3. Select applicable container registry

  4. Enter credentials

  5. Make sure you run minikube addons enable registry-creds

Minikube should now be able to authenticate with your chosen cloud provider.

kind

cat <<EOF | kind create cluster --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  kubeadmConfigPatches:
  - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: "ingress-ready=true"
  extraPortMappings:
  - containerPort: 80
    hostPort: 80
    protocol: TCP
  - containerPort: 443
    hostPort: 443
    protocol: TCP
EOF

Alternatively, if you don't need an ingress controller, you can set setupIngressController: null in your local-kubernetes provider configuration and start the cluster without the above customization.

Note that in-cluster building is currently not supported with kind clusters.

For Minikube installation instructions, please see the .

You may also want to install a driver to run the Minikube VM. Please follow the and note the name of the driver you use. The driver you choose will likely vary depending on your OS/platform. We recommend for macOS and on most Linux distributions.

If you are working in a team and need to use an external registry, you can such as ECR. Alternatively, you can enable Minikube's registry-creds addon, by following these steps:

For kind installation instructions, see the .

To use kind with Garden you may need to start your cluster with extra port mappings to allow ingress controllers to run (see for more info):

🌿
Docker Desktop
installation guide
MicroK8s
their instructions
official guide
instructions here
hyperkit
kvm2
configure Garden with an external image registry
official docs
their docs