atmos kubernetes delete
Remove the Kubernetes objects managed by a stack-configured component. Atmos renders the same manifests used for deployment, resolves each object, and deletes it from the target cluster by name and namespace.
Keep the desired objects in stack configuration, then use delete when a
component should be removed from an environment.
Usage
atmos kubernetes delete <component> --stack <stack>
atmos kubernetes delete --all --stack <stack>
delete renders the final manifests, resolves each object from GVK to GVR using
discovery and a RESTMapper, and deletes each object by name and namespace
through the Kubernetes dynamic client.
The command does not require the kubectl binary.
Example
atmos kubernetes delete argocd -s plat-ue2-dev
Example output:
deleted apps/v1/Deployment argocd/argocd-server
not-found v1/Service argocd/argocd-server
Delete components filtered by tags or labels (composes with --all/--affected to narrow the selected set further):
atmos kubernetes delete --all --tags production,tier-1
atmos kubernetes delete --affected --labels cost-center=platform
Flags
--stack,-s(required)- Atmos stack.
--all(optional)- Delete all Kubernetes components in dependency order.
--affected(optional)- Delete 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/--affectedto narrow the selected set further; cannot be combined with a single component argument.--labels(optional)Filter by labels (comma-separated
key=valuepairs, matches all):--labels=cost-center=platform,compliance=sox. Composes with--all/--affected/--tags; cannot be combined with a single component argument.