Deploy with the Nais CLI ΒΆ

Deploys to Nais are done with the Nais CLI's nais apply command. In GitHub Actions, use the nais/setup action to install the CLI.

nais/setup action inputs ΒΆ

NameDescriptionRequiredDefault
versionVersion to install (v3.8.3 or latest)Nolatest
teamDefault team written to the nais config fileNoβ€”
environmentDefault environment written to the nais config fileNoβ€”

nais apply

bash
FlagDescription
--environmentThe Nais environment to deploy to (e.g. dev-gcp, prod-gcp)
--setOverride a value in the manifest (e.g. --set spec.image=<image>)
--waitBlock until the deployment has completed
--teamThe team to deploy as (overrides config)

When no image is provided via --set spec.image and the manifest has no spec.image field, the CLI keeps whichever image is currently running.

Environment mixins ΒΆ

See Environment mixins for the concept. Conventions:

ItemValue
Base manifest.nais/app.yaml
Per-environment mixin.nais/app.<environment>.yaml
Selected by--environment <environment>

Merge rules when a mixin is applied over the base:

Field typeBehavior
MapOverridden by the mixin
ScalarOverridden by the mixin
ListConcatenated (mixin items appended to the base)

For a complete base-plus-mixin example, see Set up a complete deploy pipeline.

Examples ΒΆ

Deploy to a single environment:

bash

Deploy the same image to multiple environments:

bash

Deploy manifest-only changes, reusing the running image:

bash