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
  • Step 1 β€” Install Garden
  • Step 2 β€” Install Kubernetes locally
  • Step 3 β€” Deploy the example application
  • Step 4 β€” Update hostfile (only if needed)
  • Next Steps

Was this helpful?

  1. Basics

Quickstart Guide

PreviousHow Garden WorksNextThe Stack Graph (Terminology)

Last updated 1 year ago

Was this helpful?

In this quickstart guide we'll install Garden and deploy an example application using the local-kubernetes plugin.

Garden is pluggable by design and most often used with the (remote) Kubernetes plugin and the Terraform and/or Pulumi plugins.

Getting started with those requires a bit more set up and the goal here is to get you quickly started and to demonstrate Garden's main capabilities.

In the guide we'll:

  • Install Garden

  • Install local Kubernetes

  • Deploy an example application

Step 1 β€” Install Garden

You need the following dependencies on your local machine to use Garden:

  • Git (v2.14 or newer)

  • rsync (v3.1.0 or newer)

Run git version and rsync --version to verify that a recent enough version of Git and rsync is installed.

Then install the Garden CLI for your platform:

brew tap garden-io/garden && brew install garden-cli

For a Mac computer with Apple silicon, Garden needs .

curl -sL https://get.garden.io/install.sh | bash

Open PowerShell as an administrator and run:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/garden-io/garden/master/support/install.ps1'))

We also recommend adding an exclusion folder for the .garden directory in your repository root to Windows Defender:

Add-MpPreference -ExclusionPath "C:\Path\To\Your\Repo\.garden"

This will significantly speed up the first Garden build of large projects on Windows machines.

For more detailed installation instructions, please see our .

Step 2 β€” Install Kubernetes locally

In this guide we're using local Kubernetes since that's usually the fastest way to get started.

For real world projects we recommend using a remote Kubernetes cluster since that comes with various benefits such as shared caches and, well, doesn't require you to run K8s on your laptop!.

Then enable Kubernetes in Docker Desktop:

  1. From the Docker Dashboard, select the Preferences icon.

  2. Select Kubernetes from the left sidebar.

  3. Next to Enable Kubernetes, select the checkbox.

  4. Select Apply & Restart to save the settings and then click Install to confirm. This instantiates the images required to run the Kubernetes server as containers, and installs kubectl on your machine.

To install minikube on an AMD64 architecture, run:

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube

Once you've installed minikube, you can start it with:

minikube start

Then enable Kubernetes in Docker Desktop:

  1. From the Docker Dashboard, select the Settings icon.

  2. Select Kubernetes from the left sidebar.

  3. Next to Enable Kubernetes, select the checkbox.

  4. Select Apply & Restart to save the settings and then click Install to confirm. This instantiates the images required to run the Kubernetes server as containers, and installs kubectl on your machine.

Step 3 β€” Deploy the example application

Now that we have Garden installed and Kubernetes running locally, we can deploy our example application.

First, clone the Garden repo with:

git clone https://github.com/garden-io/quickstart-example.git

And then change into the directory of the quickstart example with:

cd quickstart-example

And finally deploy the project with Garden in dev mode:

garden deploy --dev

If the page doesn't load because the DNS address can't be found, you'll need to go to step 4 and update your hostfile. Otherwise, you're done!

The project itself doubles as an interactive guide that walks you through some common Garden commands and workflows. We encourage you to give it a spin!

Step 4 β€” Update hostfile (only if needed)

If you get an error saying that DNS address can't be found when attempting to load the page, follow the instructions below to edit the hostfile for your platform.

In your terminal, open your hostfile as an administrator by running:

sudo vim /etc/hosts

We're using vim here but feel free to use your editor of choice.

Then add the following to file and save it:

127.0.0.1 vote.local.demo.garden

First, open Notepad as an administrator.

From Notepad, open the hosts file in the C:\Windows\System32\Drivers\etc directory.

Then add the following to the file and save it:

127.0.0.1 vote.local.demo.garden

Next Steps

Now that you have Garden installed and seen its basic capabilities it's time to take the next steps.

If you already have of Kubernetes installed locally you can skip this section.

Below are our recommended local K8s providers by platform. For alternatives, check out our .

First, download and install Docker Desktop for Mac following the instructions on the .

See the for more details.

For other architectures and more detailed instructions, please see the .

First, download and install Docker Desktop for Windows following the instructions on the .

See the for more details.

You should now be able to visit the example project at .

The *.local.demo.garden domain resolves to 127.0.0.1 via our DNS provider. This means that when you go to , you should be redirected to the app that you have running locally. However, some routers will prevent redirects to 127.0.0.1 and you'll need to update your hostfile instead.

Now you should be able to load the quickstart example project in your browser at .

If you'd like to better understand how a Garden project is configured when using one of the Kubernetes plugins, we recommend going through our which walks you through configuring a Garden project step-by-step.

If you like to dive right in and configure your own project for Garden, we recommend using our for reference and reading through the different pages of the of our docs.

And if you have any questions or feedbackβ€”or just want to say hi πŸ™‚β€”we encourage you to join our !

🌳
Rosetta
Installation guide
local Kubernetes guide
official Docker site
official Docker docs
official minikube docs
official Docker site
official Docker docs
http://vote.local.demo.garden
http://vote.local.demo.garden
http://vote.local.demo.garden
first project tutorial
example projects on GitHub
Using Garden section
Discord community
a supported version