Garden — DevOps Automation for Kubernetes Development and Testing
Accelerate Kubernetes development with Garden. Define your stack as a dependency graph, get fast incremental builds, live reloading in remote clusters, and end-to-end testing pipelines.
Instalación con revisión previa
Este activo requiere revisión. El prompt copiado pide dry-run, muestra escrituras y continúa solo tras confirmación.
npx -y tokrepo@latest install 19961b63-393a-11f1-9bc6-00163e2b0d79 --target codexPrimero dry-run, confirma las escrituras y luego ejecuta este comando.
What it is
Garden is a DevOps automation tool that accelerates Kubernetes development and testing workflows. It lets you define your entire stack as a dependency graph, then handles building, deploying, and testing with fast incremental updates. Garden watches for file changes and syncs them to remote clusters in real time.
Garden targets platform engineers and backend developers who work with multi-service Kubernetes stacks where the inner development loop (code-build-deploy-test) is painfully slow.
How it saves time or tokens
Garden's dependency graph model means only changed services and their dependents rebuild and redeploy. File syncing to remote clusters replaces the full build-push-deploy cycle for iterative changes. Integrated test workflows run unit, integration, and end-to-end tests as part of the same graph, eliminating separate CI scripts. The result is inner loop times measured in seconds instead of minutes.
How to use
- Install Garden CLI and initialize your project with
garden initto generate agarden.ymlconfiguration. - Define your services, builds, and tests as modules in the Garden configuration file.
- Run
garden devto start the development loop with live reloading and automatic redeployment on file changes.
Example
# garden.yml example
kind: Module
name: api-service
type: container
build:
command: [docker, build, -t, api-service, .]
services:
- name: api
ports:
- name: http
containerPort: 3000
tests:
- name: unit
command: [npm, test]
- name: integ
command: [npm, run, test:integ]
dependencies:
- api
Related on TokRepo
- DevOps tools -- more Kubernetes and infrastructure automation tools
- Automation tools -- build and deployment automation workflows
Common pitfalls
- Garden requires a running Kubernetes cluster (local or remote); it does not provision clusters itself.
- Large monorepo projects need careful module boundary definitions to keep the dependency graph efficient.
- File sync mode works best with interpreted languages; compiled languages still require container rebuilds for dependency changes.
Preguntas frecuentes
Garden models your entire stack as a dependency graph including tests, while Skaffold focuses on the build-deploy loop for individual services. Garden's graph means only affected services rebuild. Skaffold is simpler for single-service workflows but Garden handles complex multi-service stacks better.
Yes. Garden works with any Kubernetes cluster including local ones like kind, minikube, and Docker Desktop Kubernetes. For development, a local cluster is common. For staging and CI, remote clusters are typical.
Garden is language-agnostic. It builds container images, so any language that runs in Docker works. Garden has first-class support for container modules, Helm charts, and Terraform modules. Custom build commands let you integrate any toolchain.
Garden can run in CI environments and handles build, deploy, and test stages. Some teams use Garden as their CI pipeline for preview environments and integration testing. For production deployments, most teams still use dedicated CI/CD tools like GitHub Actions or ArgoCD.
Garden supports environment variables, Garden variables, and Kubernetes secrets. You can define per-environment configurations (dev, staging, production) in your garden.yml. Secrets can be injected from external sources like Vault via environment variables.
Referencias (3)
- Garden GitHub— Garden DevOps automation platform
- Garden Documentation— Dependency graph model for incremental builds
- Garden Getting Started— Kubernetes development inner loop acceleration
Relacionados en TokRepo
Discusión
Activos relacionados
Eclipse Che — Cloud Development Environments for Kubernetes
Eclipse Che provides Kubernetes-native cloud development environments with browser-based IDEs, enabling teams to standardize and instantly provision developer workspaces.
kube-hunter — Kubernetes Security Testing from an Attacker Perspective
kube-hunter is an open-source tool by Aqua Security that hunts for security weaknesses in Kubernetes clusters by simulating an attacker's discovery and exploitation process.
cdk8s — Define Kubernetes Manifests Using Real Programming Languages
cdk8s (Cloud Development Kit for Kubernetes) lets you define Kubernetes resources using TypeScript, Python, Java, or Go, generating standard YAML manifests from code.
Sonobuoy — Kubernetes Cluster Diagnostics & Conformance Testing
A diagnostic tool that runs Kubernetes conformance tests and custom plugins to validate cluster health. Sonobuoy provides a non-destructive way to certify that clusters meet the Kubernetes specification and organizational standards.