Skip to main content

atmos kubernetes apply

Deploy the Kubernetes objects defined by a stack-configured component without leaving Atmos. apply renders the manifests, prepares the component environment, runs hooks, and applies the result to the target cluster.

atmos kubernetes apply --help
 
Configure Kubernetes Components

Define where manifests come from, which values they receive, and which credentials or hooks should run from the Kubernetes component stack configuration.

Usage

atmos kubernetes apply <component> --stack <stack>
atmos kubernetes apply --all --stack <stack>

apply renders the final manifests and applies them through Kubernetes Go clients. Atmos resolves each object from GVK to GVR using discovery and a RESTMapper, then applies it through the dynamic client with server-side apply.

The command does not require the kubectl binary.

Example

atmos kubernetes apply argocd -s plat-ue2-dev

Example output:

applied v1/Namespace argocd
applied apps/v1/Deployment argocd/argocd-server

Apply components filtered by tags or labels (composes with --all/--affected to narrow the selected set further):

atmos kubernetes apply --all --tags production,tier-1
atmos kubernetes apply --affected --labels cost-center=platform

To publish the rendered manifests to a Git deployment repository instead of applying to the cluster, configure provision.targets and select a git target with --target. See Deployment repositories (GitOps).

Flags

--stack, -s (required)

Atmos stack.

--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)

Apply all Kubernetes components in dependency order.

--affected (optional)

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

--tags (optional)

Filter by tags (comma-separated, matches any): --tags=production,tier-1. Composes with --all/--affected to narrow the selected set further; cannot be combined with a single component argument.

--labels (optional)

Filter by labels (comma-separated key=value pairs, matches all): --labels=cost-center=platform,compliance=sox. Composes with --all/--affected/--tags; cannot be combined with a single component argument.