Ported from Garden’s documentation: garden-for/kubernetes/deploy-k8s-resource.md, gliss-cli at
3bc62a036 (Garden 0.14). Gliss runs Garden under the hood; the notes on this page say where Gliss differs.In Gliss,
kubernetes Deploy actions are available at level 2 only. Your IT team enables level 2 per project, and every release is checked against IT’s policy instead of the catalog. The project still uses the gliss provider: the deploy becomes a signed release request, and the cluster agent applies it. You don’t configure Garden’s kubernetes provider or a kubeconfig.kubernetes Deploy action. This page shows how to point Garden at your manifests, deploy an image you build, and change values per environment.
The kubernetes Deploy action works much like the helm Deploy action. The full field list is in Garden’s kubernetes Deploy reference.
Reference manifests
Point Garden at your manifest files with thespec.manifestFiles field. You can also put manifests inline in spec.manifests, but files are easier to reuse with other tools.
Option 1: Manifest files (recommended)
If your project looks like this:manifests/dev and a manifests/prod directory:
garden.yml, set source.path:
Option 2: Inline
Deploy an image built by Garden
Most commonly you use thekubernetes Deploy action with a container Build action: one builds your code, the other deploys it. Your manifests will likely contain a hard-coded image, while the image Garden builds has a different version. The recommended way to set the right image is the patchResources field.
Option 1: Patch resources (recommended)
patchResources overwrites any field in your manifests with Kubernetes’ built-in patch functionality, without changing the manifest files:
Option 2: Template strings in inline manifests
If you define the manifests inline, you can use template strings in them directly:Overwrite values
The samepatchResources pattern overwrites other values. For example, to change the number of replicas and an environment variable per environment:
In Gliss, don’t put secret values in Garden variables or manifests, and don’t use Garden Cloud secrets. Secret values are set through Gliss secret requests, and your configuration refers to secrets by name only.
In Gliss, Garden’s sync mode and port forwarding aren’t available, so the
spec.sync field and Garden’s guidance on default targets for sync don’t apply. Live code changes are Git-backed and work in Preview only, through gliss dev.