Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aws cli: update-kubeconfig not working as expected

I am trying to update kubeconfig file using the below mentioned CLI

aws eks update-kubeconfig --name EKS_cluster

It is giving me this error

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument operation: Invalid choice, valid choices are:

create-cluster                           | delete-cluster
describe-cluster                         | list-clusters
help

The was cli version I am using is

aws-cli/1.15.58 Python/3.5.2 Linux/5.3.0-1030-aws botocore/1.10.57

Can someone help me with this?

like image 717
coder here Avatar asked Mar 04 '26 15:03

coder here


1 Answers

From the docs of creating a kubeconfig for Amazon EKS here

Ensure that you have version 1.16.156 or later of the AWS CLI installed.

Clearly this is because of older version(1.15.58) of CLI. Upgrading the CLI should solve this issue.

Also now the CLI has got version 2 which you can install from here

like image 63
Arghya Sadhu Avatar answered Mar 06 '26 07:03

Arghya Sadhu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!