atmos aws eks update-kubeconfig
Use this command to download kubeconfig from an EKS cluster and save it to a file.
atmos aws eks update-kubeconfig [options]
This command downloads kubeconfig from an EKS cluster and saves it to a file. It supports multiple execution modes:
-
CLI parameters only: If all the required parameters (cluster name and AWS profile/role) are provided on the command-line, then Atmos executes the command without requiring the
atmos.yamlCLI config and context.atmos aws eks update-kubeconfig --profile=<profile> --name=<cluster_name> -
Component and stack: If
componentandstackare provided on the command-line, then Atmos executes the command using theatmos.yamlCLI config and stack's context by searching for the following settings:components.helmfile.cluster_name_templatein theatmos.yamlCLI config (and calculates the--nameparameter using the Go template; the deprecatedcomponents.helmfile.cluster_name_patterntoken syntax also works)components.helmfile.helm_aws_profile_patternin theatmos.yamlCLI config (and calculates the--profileparameter using the pattern)components.helmfile.kubeconfig_pathin theatmos.yamlCLI config the variables for the component in the provided stackregionfrom the variables for the component in the stack
atmos aws eks update-kubeconfig <component> -s <stack> -
Combination: Provide a component and a stack, and override other parameters on the command line.
atmos aws eks update-kubeconfig <component> -s <stack> --kubeconfig=<path_to_kubeconfig> --region=us-east-1 -
Integration mode: Use a named integration from
auth.integrationsto authenticate via the Atmos auth system and generate kubeconfig using the Go SDK (no AWS CLI required).atmos aws eks update-kubeconfig --integration=dev/eks/primary -
Identity mode: Use an Atmos identity directly with explicit cluster parameters. This authenticates via the auth system and uses the Go SDK.
atmos aws eks update-kubeconfig --name=<cluster_name> --region=<region> --identity=<identity_name>
Refer to Update kubeconfig for more information
Run atmos aws eks update-kubeconfig --help to see all the available options
Examples
# Using component and stack
atmos aws eks update-kubeconfig <component> -s <stack>
# Using explicit CLI parameters (requires AWS CLI)
atmos aws eks update-kubeconfig --profile=<profile> --name=<cluster_name>
# Using a named integration (no AWS CLI required)
atmos aws eks update-kubeconfig --integration=dev/eks/primary
# Using an identity with explicit parameters (no AWS CLI required)
atmos aws eks update-kubeconfig --name=dev-cluster --region=us-east-2 --identity=dev-admin
# Override parameters with component and stack
atmos aws eks update-kubeconfig <component> -s <stack> --kubeconfig=<path_to_kubeconfig> --region=<region>
# Additional options
atmos aws eks update-kubeconfig --role-arn <ARN>
atmos aws eks update-kubeconfig --alias <cluster context name alias>
atmos aws eks update-kubeconfig --dry-run=true
atmos aws eks update-kubeconfig --verbose=true
Arguments
component(optional)- Atmos component.