Quickstart Guide
Last updated
Last updated
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
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:
For a Mac computer with Apple silicon, Garden needs .
For more detailed installation instructions, please see our .
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:
From the Docker Dashboard, select the Preferences icon.
Select Kubernetes from the left sidebar.
Next to Enable Kubernetes, select the checkbox.
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.
Now that we have Garden installed and Kubernetes running locally, we can deploy our example application.
First, clone the Garden repo with:
And then change into the directory of the quickstart example with:
And finally deploy the project with Garden in dev mode:
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!
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:
We're using vim here but feel free to use your editor of choice.
Then add the following to file and save it:
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 !