Example: Kustomize Components
Render and deploy Kustomize overlays with Atmos-native Kubernetes components against a local Kubernetes emulator (k3s).
This example uses provider: kustomize, so Atmos renders the overlay with the Kustomize Go API and then applies the resulting objects through the Kubernetes Go SDK. It does not require the kustomize or kubectl binaries.
The local cluster is managed by the native emulator feature — Atmos starts the k3s container, harvests its kubeconfig, and injects KUBECONFIG for you. There is no docker-compose.yml and no manual kubeconfig wiring.
Try It
cd examples/kustomize# Start the local Kubernetes emulator (k3s)atmos emulator up kubernetes -s dev# Render the dev overlayatmos kubernetes render demo -s dev --identity local-k3s# Preview and apply through the Kubernetes SDKatmos kubernetes diff demo -s dev --identity local-k3satmos kubernetes apply demo -s dev --identity local-k3s# Clean upatmos kubernetes delete demo -s dev --identity local-k3satmos emulator down kubernetes -s dev # stop (state persists)# atmos emulator reset kubernetes -s dev # stop and delete cluster state
The atmos test custom command remains available as the CI smoke wrapper for
this same lifecycle.
Key Files
| File | Purpose |
|---|---|
atmos.yaml | Kubernetes component config and the local-k3s emulator identity |
stacks/catalog/emulator/kubernetes.yaml | The local Kubernetes emulator component (driver: k3s) |
components/kubernetes/demo/base/ | Kustomize base |
components/kubernetes/demo/overlays/dev/ | Kustomize overlay used by the dev stack |
stacks/catalog/demo.yaml | Abstract component with provider and path configuration |
Auth
The local-k3s identity uses kind: kubernetes/emulator, bound to the kubernetes emulator component. Running with --identity local-k3s makes Atmos resolve the running k3s container, harvest its admin kubeconfig, and export KUBECONFIG into the component environment — so the Kubernetes SDK client talks to the emulator with no extra configuration.
For real EKS clusters, pair an AWS identity with an aws/eks integration that writes kubeconfig for the cluster.