Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 |
Tags
- ERR_CERT_INVALID
- 맥북 엑셀 한글
- Cannot upload enabled repos report
- EKS
- yum
- ovirt
- 인증서
- 빠르게
- 테라폼 버전
- OSX 엑셀
- rhv
- invalid apiVersion
- 맥북 한글
- v1alpha1
- tfenv
- 버전관리
- 타임머신
- 테라폼
- 연결이 비공개
- terraform
- Chrome
- 맥북 백업
- AWS
Archives
- Today
- Total
hisosic
error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1" 본문
Container/Kubernetes
error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"
hisosic 2023. 9. 14. 14:06

EKS Cluster 의 Kubernetes version 1.27 및 kubectl 1.27 으로 업데이트 후 kubectl 명령을 하면 아래와 같이 에러가 발생했다.
[root@server app]# kubectl get all -A
error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"
원인은 1.24 부터는 api 가 변경 된 것으로 보인다.
해결 방법은 아래와 같이 ~/.kube/config 내용에 apiVersion 경로를 변경 해줬다. v1alpha1 -> v1beta1
[root@server aws]# cat ~/.kube/config
apiVersion: v1
clusters:
...
...
- name: arn:aws:eks:ap-northeast-2:...:cluster/elk
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
args:
- --region
- ap-northeast-2
- eks
- get-token
- --cluster-name
- elk
command: aws
만약 아래와 같이 에러가 발생한다면 추가 작업도 필요하다. (aws-cli update)
Unable 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"
aws-cli update 방법
[root@server k8s]# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
[root@server k8s]# unzip awscliv2.zip
[root@server k8s]# cd aws
[root@server aws]# ./install --update
[root@server aws]# aws --version
aws-cli/2.13.18 Python/3.11.5 Linux/3.10.0-1127.el7.x86_64 exe/x86_64.centos.7 prompt/off
[root@server aws]# kubectl get all -A
NAMESPACE NAME READY STATUS RESTARTS AGE
cert-manager pod/cert-manager-5b65cb968c-q8mcz 1/1 Running 0 18m
cert-manager pod/cert-manager-cainjector-56b88bcdf7-z8gbx 1/1 Running 0 24m
cert-manager pod/cert-manager-webhook-c784c79c7-4pz4q 1/1 Running 0 15m
elastic-system pod/elastic-operator-0 1/1 Running 0 24m
kube-system pod/aws-load-balancer-controller-76c5658bf9-fx6b5 1/1 Running 0 24m
kube-system pod/aws-node-4mktn 1/1 Running 0 14m
kube-system pod/aws-node-rkbjn 1/1 Running 0 25m
kube-system pod/aws-node-w2jpd 1/1 Running 0 26m
kube-system pod/coredns-d596d9655-275m8 1/1 Running 0 15m
kube-system pod/coredns-d596d9655-8s5f9 1/1 Running 0 18m
kube-system pod/ebs-csi-controller-77995bbbbd-95sqb 6/6 Running 0 18m
kube-system pod/ebs-csi-controller-77995bbbbd-cj92f 6/6 Running 0 15m
kube-system pod/ebs-csi-node-b7npk 3/3 Running 0 14m
kube-system pod/ebs-csi-node-dj585 3/3 Running 0 26m
kube-system pod/ebs-csi-node-hmtdc 3/3 Running 0 25m
kube-system pod/kube-proxy-bxx4l 1/1 Running 0 26m
kube-system pod/kube-proxy-gmfcw 1/1 Running 0 25m
kube-system pod/kube-proxy-n262s 1/1 Running 0 14m
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
cert-manager service/cert-manager ClusterIP 172.20.63.51 <none> 9402/TCP 178d
cert-manager service/cert-manager-webhook ClusterIP 172.20.78.240 <none> 443/TCP 178d
default service/kubernetes ClusterIP 172.20.0.1 <none> 443/TCP 178d
elastic-system service/elastic-webhook-server ClusterIP 172.20.29.145 <none> 443/TCP 178d
kube-system service/aws-load-balancer-webhook-service ClusterIP 172.20.209.21 <none> 443/TCP 178d
kube-system service/kube-dns ClusterIP 172.20.0.10 <none> 53/UDP,53/TCP 178d
NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
kube-system daemonset.apps/aws-node 3 3 3 3 3 <none> 178d
kube-system daemonset.apps/ebs-csi-node 3 3 3 3 3 kubernetes.io/os=linux 176d
kube-system daemonset.apps/ebs-csi-node-windows 0 0 0 0 0 kubernetes.io/os=windows 176d
kube-system daemonset.apps/kube-proxy 3 3 3 3 3 <none> 178d
NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE
cert-manager deployment.apps/cert-manager 1/1 1 1 178d
cert-manager deployment.apps/cert-manager-cainjector 1/1 1 1 178d
cert-manager deployment.apps/cert-manager-webhook 1/1 1 1 178d
kube-system deployment.apps/aws-load-balancer-controller 1/1 1 1 178d
kube-system deployment.apps/coredns 2/2 2 2 178d
kube-system deployment.apps/ebs-csi-controller 2/2 2 2 176d
NAMESPACE NAME DESIRED CURRENT READY AGE
cert-manager replicaset.apps/cert-manager-5b65cb968c 1 1 1 178d
cert-manager replicaset.apps/cert-manager-cainjector-56b88bcdf7 1 1 1 178d
cert-manager replicaset.apps/cert-manager-webhook-c784c79c7 1 1 1 178d
kube-system replicaset.apps/aws-load-balancer-controller-76c5658bf9 1 1 1 178d
kube-system replicaset.apps/coredns-d596d9655 2 2 2 178d
kube-system replicaset.apps/ebs-csi-controller-6f49d6c768 0 0 0 176d
kube-system replicaset.apps/ebs-csi-controller-77995bbbbd 2 2 2 176d'Container > Kubernetes' 카테고리의 다른 글
| [K8S] 설치할때 발생하는 에러 및 해결 방법 (0) | 2022.08.03 |
|---|---|
| EKS instance당 수용 가능한 pod 갯수 (0) | 2022.04.19 |
Comments