LogoLogo
Bonsai (0.13) DocsGitHubDiscord CommunityGarden Enterprise
Edge Release
Edge Release
  • Welcome to Garden!
  • Overview
    • What is Garden
    • Use Cases
      • Isolated On-Demand Preview Environments
      • Fast, Portable CI Pipelines that Run Anywhere
      • Shift Testing Left
      • Local Development With Remote Clusters
      • Jumpstart your Internal Developer Platform
    • Garden vs Other Tools
  • Getting Started
    • Quickstart
    • Garden Basics
    • Next Steps
  • Tutorials
    • Your First Project
      • 1. Create a Garden Project
      • 2. Pick a Kubernetes Plugin
      • 3. Add Actions
      • 4. Add Tests
      • 5. Code Syncing (Hot Reload)
      • 6. Next Steps
    • Setting up a Kubernetes cluster
      • 1. Create a Cluster
        • AWS
        • GCP
        • Azure
      • 2. Configure Container Registry
        • AWS
        • GCP
        • Azure
        • Docker Hub
      • 3. Set Up Ingress, TLS and DNS
      • 4. Configure the Provider
  • Using Garden With
    • Containers
      • Using Remote Container Builder
      • Building Containers
    • Kubernetes
      • Using Remote Kubernetes
      • Using Local Kubernetes
      • Deploying K8s Resources
      • Installing Helm charts
      • Running Tests and Tasks
    • Terraform
      • Using Terraform
      • Applying Terrform Stacks
    • Pulumi
      • Using Pulumi
      • Applying Pulumi Stacks
    • Local Scripts
  • Features
    • Remote Container Builder
    • Team Caching
    • Variables and Templating
    • Config Templates
    • Workflows
    • Code Synchronization
    • Custom Commands
    • Remote Sources
  • Guides
    • Connecting a Project
    • Environments and Namespaces
    • Installing Garden
    • Including/Excluding files
    • Installing Local Kubernetes
    • Migrating from Docker Compose to Garden
    • Using the CLI
    • Using Garden in CircleCI
    • Minimal RBAC Configuration for Development Clusters
    • Deploying to Production
    • Using a Registry Mirror
  • Reference
    • Providers
      • container
      • exec
      • jib
      • kubernetes
      • local-kubernetes
      • otel-collector
      • pulumi
      • terraform
    • Action Types
      • Build
        • container Build
        • exec Build
        • jib-container Build
      • Deploy
        • container Deploy
        • exec Deploy
        • helm Deploy
        • kubernetes Deploy
        • pulumi Deploy
        • terraform Deploy
      • Run
        • container Run
        • exec Run
        • helm-pod Run
        • kubernetes-exec Run
        • kubernetes-pod Run
      • Test
        • container Test
        • exec Test
        • helm-pod Test
        • kubernetes-exec Test
        • kubernetes-pod Test
    • Template Strings
      • Project template context
      • Environment template context
      • Provider template context
      • Action (all fields) template context
      • Action spec template context
      • Module template context
      • Remote Source template context
      • Project Output template context
      • Custom Command template context
      • Workflow template context
      • Template Helper Functions
    • Commands
    • Project Configuration
    • ConfigTemplate Reference
    • RenderTemplate Reference
    • Workflow Configuration
    • Garden Containers on Docker Hub
    • Glossary
    • Module Template Configuration
    • Module Types
      • container
      • exec
      • helm
      • jib-container
      • kubernetes
      • pulumi
      • templated
      • terraform
  • Misc
    • FAQ
    • Troubleshooting
    • Telemetry
    • How Organizations Adopt Garden
    • New Garden Cloud Version
    • Migrating to Cedar
    • Migrating to Bonsai
    • Ingress NGINX Vulnerability
    • Deprecations
  • Contributing to Garden
    • Contributor Covenant Code of Conduct
    • Contributing to the Docs
    • Setting up Your Developer Environment
    • Developing Garden
    • Config Resolution
    • Graph Execution
Powered by GitBook
On this page
  • Next Steps
  • Troubleshooting

Was this helpful?

  1. Getting Started

Quickstart

PreviousGarden vs Other ToolsNextGarden Basics

Last updated 17 days ago

Was this helpful?

Garden is a DevOps automation tool for developing and testing Kubernetes apps faster.

In this quickstart guide, we'll:

  • Install Garden

  • Build an example project and (optionally) deploy it to a local Kubernetes cluster

Requirements

  • Docker running on the system

  • A local Kubernetes installation (optional)

If you don't have Kubernetes installed, you can check out our guide on or simply skip the deploy step below and instead go to step 4b.

Step 1 — Install Garden

Install the Garden CLI for your platform:

brew install garden-io/garden/garden-cli
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, see our .

Step 2 — Clone the example project

Next, we clone the example project from GitHub and change into the project directory:

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

Step 3 — Connect your project

You connect the project via the login command like so:

garden login

You'll be asked to create an account if you haven't already. Once you've logged in an organizationId will be added to the project config. This is of course just an example project but in general you should check the Garden config file with the organizationId into your source control.

Step 4a — Deploy the project to local Kubernetes

If you don't have a local installation of Kubernetes you can skip this step and hop over to step 4b instead.

Now we can deploy the example project to our local Kubernetes cluster. We'll deploy the project in sync mode which enables live code syncing and starts the dev console:

garden deploy --sync

This example project also includes unit and integration tests. To run all tests in this project, type test in the dev console and hit enter (you can also run specific tests with e.g. test unit and test integ).

Once the tests pass, try running the same test command again. This time Garden should tell you all the tests have already passed at this version. It will also tell you that the container images are already built. That's Garden's smart caching in action and it can dramatically speed up CI pipelines and dev workflows.

Step 4b — Build the project without Kubernetes

To build the project, run:

garden build --env no-k8s

If you now run the garden build --env no-k8s command again, you should see that all the images are already built. That's Garden's smart caching in action and it can dramatically speed up CI pipelines and dev workflows.

Next Steps

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

Troubleshooting

If you get an error saying Cannot connect to the Docker daemon at /path/to/docker.sock. Is the docker daemon running?, make sure you have Docker running on your system and try again.

Now we need to connect the project to the Garden Cloud backend. This is required to use features such as and the .

You can .

This will build all the containers in this project with the and deploy them to your Kubernetes cluster. You can then visit the example project via created by Garden. You can also see the build results in the .

Garden test caching

The project itself doubles as an interactive guide that walks you through some common Garden commands and workflows. You can open it via created by Garden when you ran the deploy command with the --sync flag. We encourage you to give it a spin!

Even if you don't have Kubernetes you can still use the to build the container images in this project.

Garden will use the remote container builder to build the images. You can view the results in the .

Garden build caching

Start by checking out the which covers the main concepts that you need to understand.

After that you can either go through which explains step-by-step how to add Garden to an existing project. Or you can check out the which gives you a more high level but still step-wise overview of how to adopt Garden and add it to your stack.

If you have any questions or feedback—or just want to say hi 🙂—we encourage you to join our !

If you bump into other issues, don't hesitate to open a .

installing local Kubernetes
Installation guide
team-wide caching
Remote Container Builder
learn more about connecting projects here
Remote Container Builder
the port forward
Builds UI
the port forward
Remote Container Builder
Builds UI
Garden basics guide
first project tutorial
Next Steps guide
Discord community
GitHub issue in the Garden repo
Garden caching
Garden caching