일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- aws
- 정보처리기사 실기 기출문제
- CloudWatch
- 코틀린 코루틴의 정석
- 공부
- Linux
- Pinpoint
- kotlin querydsl
- kotlin coroutine
- IntelliJ
- 정보처리기사 실기
- kotlin
- 오블완
- MySQL
- CKA
- 티스토리챌린지
- Java
- Spring
- mysql 튜닝
- Elasticsearch
- Kubernetes
- PETERICA
- APM
- CKA 기출문제
- AWS EKS
- kotlin spring
- minikube
- AI
- 기록으로 실력을 쌓자
- 정보처리기사실기 기출문제
- Today
- Total
피터의 개발이야기
[kubernetes 트러블슈팅] error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1" 본문
[kubernetes 트러블슈팅] error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"
기록하는 백앤드개발자 2022. 8. 1. 13:03ㅁ 개요
ㅇ 프로메테우스를 AWS 환경에 구축 테스트 진행하는 과정에서 발생한 에러 트라블슈팅
ㅇ 쿠버네티스 프로메테우스 설치 과정은 여기에서 볼 수 있다.
ㅁ 에러 발생
[ec2-user@ip-172-31-43-214 ~]$ helm install prometheus prometheus-community/kube-prometheus-stack
Error: INSTALLATION FAILED: Kubernetes cluster unreachable: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"
ㅇ 에러에 대해서 검색한 결과 힌트를 찾았다.
ㅇ aws eks update-kubeconfig invalid apiVersion #6920
Install and Set Up kubectl on Linux
Before you begin You must use a kubectl version that is within one minor version difference of your cluster. For example, a v1.24 client can communicate with v1.23, v1.24, and v1.25 control planes. Using the latest compatible version of kubectl helps avoid
kubernetes.io
ㅇ 1.23.6 버젼으로 다운그레이드를 권고하고 있다.
ㅁ EKS Version에 따른 에러
ㅇ 최신 kubectl 버전(1.24.1) 사용 시 EKS 버전과 충돌이 발생하여 문제가 발생하고 있었다. 그래서 kubectl를 다운그래이드 해야한다
ㅁ kubectl을 1.23.6 버전으로 재설치
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.23.6/bin/linux/amd64/kubectl
ㅁ Helm 에러 발생
[ec2-user@ip-172-31-43-214 ~]$ helm upgrade -i prometheus prometheus-community/prometheus \
> --namespace prometheus \
> --set alertmanager.persistentVolume.storageClass="gp2",server.persistentVolume.storageClass="gp2"
Error: Kubernetes cluster unreachable: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"
ㅇ Helm에도 EKS와 버젼 문제가 발생하여 다운그레이드를 하였다.
ㅁ helm 3.8.2로 다운그레이드
curl -L https://git.io/get_helm.sh | bash -s -- --version v3.8.2
ㅇ helm version 3.8.2로 다운그레이드를 하였다.
[ec2-user@ip-172-31-43-214 ~]$ curl -L https://git.io/get_helm.sh | bash -s -- --version v3.8.2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 6666 100 6666 0 0 5455 0 0:00:01 0:00:01 --:--:-- 5455
Helm v3.8.2 is available. Changing from version .
Downloading https://get.helm.sh/helm-v3.8.2-linux-amd64.tar.gz
Preparing to install helm and tiller into /usr/local/bin
helm installed into /usr/local/bin/helm
info: tiller binary was not found in this release; skipping tiller installation
Run 'helm init' to configure helm.
ㅁ helm 설치 확인
ㅇ helm의 정상 설치를 확인 하였다.
ㅇ 이후 프로메테우스 설치를 정상적으로 진행할 수 있었다.
ㅁ 함께 보면 좋은 사이트
ㅇ kubectl 다운그레이드 방법:
Install and Set Up kubectl on Linux
Before you begin You must use a kubectl version that is within one minor version difference of your cluster. For example, a v1.24 client can communicate with v1.23, v1.24, and v1.25 control planes. Using the latest compatible version of kubectl helps avoid
kubernetes.io