Skip to main content

atmos kubernetes deploy

Run a Kubernetes deployment using Atmos language. deploy is the workflow-friendly alias for applying a stack-configured Kubernetes component, useful when your automation treats Kubernetes resources as deployable services.

atmos kubernetes deploy --help
Configure Kubernetes Components

deploy uses the same stack and atmos.yaml settings as apply, including manifest paths, variables, credentials, hooks, and dependency ordering.

Usage​

atmos kubernetes deploy <component> --stack <stack>
atmos kubernetes deploy --affected --base origin/main --include-dependents

In v1, deploy is an alias of atmos kubernetes apply. It renders the final manifests and applies them through the Kubernetes Go SDK using server-side apply.

Use deploy when you want command language that matches an application deployment workflow. Use apply when you want command language that mirrors Kubernetes API behavior.

Example​

atmos kubernetes deploy argocd -s plat-ue2-dev

Deployment repositories (GitOps)​

By default deploy/apply applies the rendered manifests to the cluster. A component can instead publish them to a Git deployment repository (the source-of-truth that Argo CD or Flux reconciles) by declaring delivery targets under provision.targets:

components:
kubernetes:
argocd:
provision:
default: cluster
targets:
cluster:
kind: kubernetes
deployment-repo:
kind: git
repository: deployments # references git.repositories.<name>
path: "clusters/{{ .vars.cluster }}/argocd"
commit:
message: "Render {{ .vars.app_name }} for {{ .vars.stage }}"

Selecting the git target renders the manifests once and commits them to the configured repository instead of applying to the cluster:

atmos kubernetes deploy argocd -s plat-ue2-dev --target=deployment-repo

When --target is omitted, provision.default is used, otherwise the cluster. Credentials for cloning and pushing come from Atmos Auth (GitHub STS), so no tokens are stored in the manifests.

Flags​

--stack, -s (optional)

Atmos stack. Required when deploying a named component; not required with --affected.

--target (optional)

Provision target to deliver to (a named provision.targets entry, e.g. a git deployment repository). Defaults to provision.default, otherwise the cluster.

--all (optional)

Deploy all Kubernetes components in dependency order.

--affected (optional)

Deploy affected Kubernetes components and their dependencies.
--include-dependents (optional)
With --affected, include dependent Kubernetes components.