Skills2026年4月16日·1 分钟阅读

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.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Garden K8s Dev Platform
先审查命令
npx -y tokrepo@latest install 19961b63-393a-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

TL;DR
Garden defines your stack as a dependency graph for fast incremental builds and live reloading in remote Kubernetes clusters.
§01

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.

§02

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.

§03

How to use

  1. Install Garden CLI and initialize your project with garden init to generate a garden.yml configuration.
  2. Define your services, builds, and tests as modules in the Garden configuration file.
  3. Run garden dev to start the development loop with live reloading and automatic redeployment on file changes.
§04

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
§05

Related on TokRepo

§06

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.

常见问题

How does Garden differ from Skaffold?+

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.

Does Garden work with local Kubernetes clusters?+

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.

What languages and frameworks does Garden support?+

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.

Can Garden replace my CI/CD pipeline?+

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.

How does Garden handle secrets and configuration?+

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.

引用来源 (3)

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产