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 executes aws eks update-kubeconfig command to download kubeconfig from an EKS cluster and saves it to a file.
The command can execute aws eks update-kubeconfig in three different ways:
- 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.
For example:
atmos aws eks update-kubeconfig --profile=<profile> --name=<cluster_name>
- 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_patternin theatmos.yamlCLI config (and calculates the--nameparameter using the pattern)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
For example:
atmos aws eks update-kubeconfig <component> -s <stack>
- Combination of the above. Provide a component and a stack, and override other parameters on the command line.
For example:
atmos aws eks update-kubeconfig <component> -s <stack> --kubeconfig=<path_to_kubeconfig> --region=us-east-1
info
Refer to Update kubeconfig for more information
tip
Run atmos aws eks update-kubeconfig --help to see all the available options
Examples​
atmos aws eks update-kubeconfig <component> -s <stack>
atmos aws eks update-kubeconfig --profile=<profile> --name=<cluster_name>
atmos aws eks update-kubeconfig <component> -s <stack> --kubeconfig=<path_to_kubeconfig> --region=<region>
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.
Flags​
--stack/-s(optional)- Atmos stack.
--profile(optional)- AWS profile to use to authenticate to the EKS cluster.
--role-arn(optional)- AWS IAM role ARN to use to authenticate to the EKS cluster.
--name(optional)- EKS cluster name.
--region(optional)- AWS region.
--kubeconfig(optional)kubeconfigfilename to append with the configuration.--alias(optional)- Alias for the cluster context name. Defaults to match cluster ARN.
--dry-run(optional)- Print the merged kubeconfig to stdout instead of writing it to the specified file.
--verbose(optional)- Print more detailed output when writing the kubeconfig file, including the appended entries.