amazon-web-services - AWS CLI : update-kubeconfig not working as expected

标签 amazon-web-services kubernetes command-line-interface amazon-eks

我正在尝试使用下面提到的 CLI 更新 kubeconfig 文件

aws eks update-kubeconfig --name EKS_cluster

它给了我这个错误

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

我使用的 was cli 版本是

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

有人可以帮我解决这个问题吗?

最佳答案

来自为 Amazon EKS 创建 kubeconfig 的文档 here

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

显然这是因为旧版本的 CLI (1.15.58)。升级 CLI 应该可以解决这个问题。

现在 CLI 已经有了版本 2,您可以从 here 安装它。

关于amazon-web-services - AWS CLI : update-kubeconfig not working as expected,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63116765/

相关文章:

amazon-web-services - sagemaker 中的逻辑回归

javascript - AWS Lambda : Delete S3 File After Downloaded

perl - 根据当前文件的内容从 awk 搜索/读取另一个文件,是否可能?

linux - 在linux服务器中的哪里写命令

ruby-on-rails - AWS Certificate Manager - SSL 表示正在使用,但 HTTPS 不起作用

javascript - Lambda 代理的 AWS APIGateway CORS 不适用

kubernetes - 如何撤销Kubernetes中的客户端证书?

azure - Azure 上的 Kubernetes 多集群 Pod 对等

kubernetes - Kubernetes:无法在微服务应用程序中互连Pod

java - 将参数添加到从命令行调用的 Maven Enforcer Rules