无法连接到服务器:获取凭据:解码标准输出:没有为版本注册任何类型的“ExecCredential”

San*_*ran 15 amazon-web-services kubernetes ubuntu-16.04 amazon-eks

**无法连接到服务器:获取凭据:解码标准输出:方案“pkg/client/auth/exec/exec.go”中的版本“client.authentication.k8s.io/v1alpha1”没有注册任何类型“ExecCredential”: 62 英寸\n**

\n
2022-09-16 16:35:00 [\xe2\x84\xb9]  eksctl version 0.111.0\n2022-09-16 16:35:00 [\xe2\x84\xb9]  using region ap-south-1\n2022-09-16 16:35:00 [\xe2\x84\xb9]  skipping ap-south-1c from selection because it doesn\'t support the following instance type(s): t2.micro\n2022-09-16 16:35:00 [\xe2\x84\xb9]  setting availability zones to [ap-south-1a ap-south-1b]\n2022-09-16 16:35:00 [\xe2\x84\xb9]  subnets for ap-south-1a - public:192.168.0.0/19 private:192.168.64.0/19\n2022-09-16 16:35:00 [\xe2\x84\xb9]  subnets for ap-south-1b - public:192.168.32.0/19 private:192.168.96.0/19\n2022-09-16 16:35:00 [\xe2\x84\xb9]  nodegroup "ng-1" will use "" [AmazonLinux2/1.23]\n2022-09-16 16:35:00 [\xe2\x84\xb9]  using Kubernetes version 1.23\n2022-09-16 16:35:00 [\xe2\x84\xb9]  creating EKS cluster "basic-cluster" in "ap-south-1" region with managed nodes\n2022-09-16 16:35:00 [\xe2\x84\xb9]  will create 2 separate CloudFormation stacks for cluster itself and the initial managed nodegroup\n2022-09-16 16:35:00 [\xe2\x84\xb9]  if you encounter any issues, check CloudFormation console or try \'eksctl utils describe-stacks --region=ap-south-1 --cluster=basic-cluster\'\n2022-09-16 16:35:00 [\xe2\x84\xb9]  Kubernetes API endpoint access will use default of {publicAccess=true, privateAccess=false} for cluster "basic-cluster" in "ap-south-1"\n2022-09-16 16:35:00 [\xe2\x84\xb9]  CloudWatch logging will not be enabled for cluster "basic-cluster" in "ap-south-1"\n2022-09-16 16:35:00 [\xe2\x84\xb9]  you can enable it with \'eksctl utils update-cluster-logging --enable-types={SPECIFY-YOUR-LOG-TYPES-HERE (e.g. all)} --region=ap-south-1 --cluster=basic-cluster\'\n2022-09-16 16:35:00 [\xe2\x84\xb9]  \n2 sequential tasks: { create cluster control plane "basic-cluster", \n    2 sequential sub-tasks: { \n        wait for control plane to become ready,\n        create managed nodegroup "ng-1",\n    } \n}\n2022-09-16 16:35:00 [\xe2\x84\xb9]  building cluster stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:35:00 [\xe2\x84\xb9]  deploying stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:35:30 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:36:01 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:37:01 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:38:01 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:39:01 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:40:01 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:41:02 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:42:02 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:43:02 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:44:02 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:45:02 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:46:03 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-cluster"\n2022-09-16 16:48:05 [\xe2\x84\xb9]  building managed nodegroup stack "eksctl-basic-cluster-nodegroup-ng-1"\n2022-09-16 16:48:05 [\xe2\x84\xb9]  deploying stack "eksctl-basic-cluster-nodegroup-ng-1"\n2022-09-16 16:48:05 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-nodegroup-ng-1"\n2022-09-16 16:48:36 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-nodegroup-ng-1"\n2022-09-16 16:49:22 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-nodegroup-ng-1"\n2022-09-16 16:49:53 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-nodegroup-ng-1"\n2022-09-16 16:51:15 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-nodegroup-ng-1"\n2022-09-16 16:52:09 [\xe2\x84\xb9]  waiting for CloudFormation stack "eksctl-basic-cluster-nodegroup-ng-1"\n2022-09-16 16:52:09 [\xe2\x84\xb9]  waiting for the control plane availability...\n2022-09-16 16:52:09 [\xe2\x9c\x94]  saved kubeconfig as "/home/santhosh_puvaneswaran/.kube/config"\n2022-09-16 16:52:09 [\xe2\x84\xb9]  no tasks\n2022-09-16 16:52:09 [\xe2\x9c\x94]  all EKS cluster resources for "basic-cluster" have been created\n2022-09-16 16:52:09 [\xe2\x84\xb9]  nodegroup "ng-1" has 3 node(s)\n2022-09-16 16:52:09 [\xe2\x84\xb9]  node "ip-192-168-15-31.ap-south-1.compute.internal" is ready\n2022-09-16 16:52:09 [\xe2\x84\xb9]  node "ip-192-168-35-216.ap-south-1.compute.internal" is ready\n2022-09-16 16:52:09 [\xe2\x84\xb9]  node "ip-192-168-36-191.ap-south-1.compute.internal" is ready\n2022-09-16 16:52:09 [\xe2\x84\xb9]  waiting for at least 3 node(s) to become ready in "ng-1"\n2022-09-16 16:52:09 [\xe2\x84\xb9]  nodegroup "ng-1" has 3 node(s)\n2022-09-16 16:52:09 [\xe2\x84\xb9]  node "ip-192-168-15-31.ap-south-1.compute.internal" is ready\n2022-09-16 16:52:09 [\xe2\x84\xb9]  node "ip-192-168-35-216.ap-south-1.compute.internal" is ready\n2022-09-16 16:52:09 [\xe2\x84\xb9]  node "ip-192-168-36-191.ap-south-1.compute.internal" is ready\n\n*2022-09-16 16:52:10 [\xe2\x9c\x96]  unable to use kubectl with the EKS cluster (check \'kubectl version\'): WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.\nUnable to connect to the server: getting credentials: decoding stdout: no kind "ExecCredential" is registered for version "client.authentication.k8s.io/v1alpha1" in scheme "pkg/client/auth/exec/exec.go:62"* \n\n2022-09-16 16:52:10 [\xe2\x84\xb9]  cluster should be functional despite missing (or misconfigured) client binaries\n2022-09-16 16:52:10 [\xe2\x9c\x94]  EKS cluster "basic-cluster" in "ap-south-1" region is ready\nsanthosh_puvaneswaran@it002072:\n\n
Run Code Online (Sandbox Code Playgroud)\n

我不明白为什么我一次又一次地遇到这个错误,在此输入图像描述

\n

我可以创建集群并删除,但无法对其进行操作..!

\n

goh*_*m'c 32

您需要将 AWS CLI 更新到 >2.7.25 或最新版本(推荐),确保您的 CLI 指向正确的区域,然后尝试eksctl utils write-kubeconfig --cluster=<name>. 打开kubeconfig文件,检查client.authentication.k8s.io/v1alpha1已更改为client.authentication.k8s.io/v1beta1.

  • 我没有安装 `eksctl`,但这个命令对我有用:`aws eks update-kubeconfig --name=&lt;your-cluster-name&gt;` (2认同)

小智 14

对我来说,它适用于 awscli v2

脚步:

# Download AWS CLI v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

# Un-compress the archive
unzip awscliv2.zip

# Run the installer
sudo ./aws/install
Run Code Online (Sandbox Code Playgroud)


Adi*_*ngu 8

对于 awscli 版本 2,运行:

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install --update
Run Code Online (Sandbox Code Playgroud)