EKS workshop 오류 모음

문학적인유사성·2022년 12월 23일
0

AWS

목록 보기
37/64

kubectl, eksctl도 따로 공식문서에서 다운받아서 사용함.
rolename 가져오는것도 조금 달라서 수정해서 사용


eksctl테스트

여기서 rolename이 주어진대로 명령어쓰면 안나와서 찾아서 넣어줬다. 왜이러지..


쿠베 대시보드 버전이 안맞아서 버전 확인후 다시 설치
그래도 버전이 안맞는지 계속 개요 화면은 확인이 어렵다 -> 추후에 확인해봐야겠다... 일단 되는 화면과 안되는 화면 둘다 있음.. ;;


helm
no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1beta1"
v1beta1~~ -> v1으로 변경 ~~-> kubectl, helm 버전 다운그레이드 하는 것으로 변경

---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: tiller
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: tiller
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: tiller
    namespace: kube-system
~                             

2버전에 있던 틸러(tiller)가 3버전에서 제거됨.

Error: INSTALLATION FAILED: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp 127.0.0.1:8080: connect: connection refused

kubectl The connection to the server localhost:8080 was refused - did you specify the right host or port

eks구축시 접근이 안되는 문제(user를 바꿔서 사용하려고하니 이렇게 오류가 남 이때 새로 설정해줘야되는데 )

$ aws eks --region ${cluster-region} update-kubeconfig --name ${cluster-name}

# ~~~~~~~ cluster/eksworkshop-eksctl to /home/ec2-user/.kube/config 이렇게 설정이 됨! 

helm버전 낮추고, kubectl 버전 낮추고 엄청 삽질했다..
-> 스택오버플로우에서 eks에서 최신 버전이 안되는게 있다고 글을 보고 버전을 낮췄음

helm3에서 --purge사라짐
Just to note as of helm v3 --purge is default behaviour. You no longer need the flag

If you want to keep any history (aka the behaviour of helm 2.x's helm delete without the --purge flag) you now need to use --keep-history eg helm delete nginx-ingress --keep-history

스택오버플로우 감사합니다 ㅜㅜㅜ

그냥 메트릭스 깃허브에서 설치해버렸음 ( 메트릭스 버전이 안맞다는 문제)

Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: [unable to recognize "": no matches for kind "RoleBinding" in version "rbac.authorization.k8s.io/v1beta1", unable to recognize "": no matches for kind "Deployment" in version "apps/v1beta2", unable to recognize "": no matches for kind "APIService" in version "apiregistration.k8s.io/v1beta1"]

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml

명령어 수정 ( workshop에서 deploy를 찾을수없다고 나옴 )
kubectl run php-apache --image=k8s.gcr.io/hpa-example --requests=cpu=200m --expose --port=80

이거 안되서
kubectl create deployment php-apache --image=us.gcr.io/k8s-artifacts-prod/hpa-example
kubectl set resources deployment.apps/php-apache --requests=cpu=200m
kubectl expose deployment.apps/php-apache --port 80

yaml파일 버전 공식문서보면서 다 맞추면 됨
Deployment는 버전 어디인지 이런거 맞춰서 다 해결하기

error validating data: ValidationError(Deployment.spec): missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpec; if you choose to ignore these errors, turn validation off with --validate=false

구버전의 경우 SELECTOR가 없음
selector를 추가해주자..!

profile
유사 IT 항해

0개의 댓글