atmos aws eks update-kubeconfig
Use this command to download kubeconfig from an EKS cluster and save it to a file.
Executes aws eks update-kubeconfig command.
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
atmosexecutes the command without requiring theatmosCLI config and context.For example:
atmos aws eks update-kubeconfig --profile=<profile> --name=<cluster_name>If
componentandstackare provided on the command-line, thenatmosexecutes the command using theatmosCLI 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
Refer to Update kubeconfig for more information
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
| Argument | Description | Required |
|---|---|---|
component | atmos component | no |
Flags
| Flag | Description | Alias | Required |
|---|---|---|---|
--stack | atmos stack | -s | no |
--profile | AWS profile to use to authenticate to the EKS cluster | no | |
--role-arn | AWS IAM role ARN to use to authenticate to the EKS cluster | no | |
--name | EKS cluster name | no | |
--region | AWS region | no | |
--kubeconfig | kubeconfig filename to append with the configuration | no | |
--alias | Alias for the cluster context name. Defaults to match cluster ARN | no | |
--dry-run | Print the merged kubeconfig to stdout instead of writing it to the specified file | no | |
--verbose | Print more detailed output when writing the kubeconfig file, including the appended entries | no |