문제 설명
내 Google Kubernetes 클러스터로 Kubectl 컨텍스트를 변경할 수 없음 (Unable to Change Kubectl Context to my Google Kubernetes Cluster)
Cloud Console을 통해 Google Kubernetes Engine 클러스터를 만들었습니다. 이제 로컬 컴퓨터에서 kubectl
을 사용하여 연결하려고 합니다. 몇 주 전에
gcloud container clusters get‑credentials cents‑ideas ‑‑zone europe‑west3‑a ‑‑project cents‑ideas
Cloud Console에서 제공한 대로 사용했습니다.
이 명령어를 실행한 후의 출력은 다음과 같습니다.
Fetching cluster endpoint and auth data.
kubeconfig entry generated for cents‑ideas.
하지만 클러스터는 kubectl config get‑contexts
또는 kubectl config current‑context
로 설정되지 않습니다. 이 명령이 작동하는 데 아무런 차이가 없었기 때문에 혼란스럽습니다.
내 <코드>
참조 솔루션
방법 1:
I had microk8s
installed. Removing it and instead installing snap install kubectl
fixed my issue.