[마이 페이지]>[계정 관리]>[인증키 관리] 7 curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl 8 mkdir -p ~/.ncloud 9 vi ~/.ncloud/configure 10 서울 리전일 경우 KR , UUID 확인 하여 입력 ncp-iam-authenticator create-kubeconfig --region KR --clusterUuid c4xxfc78d > kubeconfig.yml 싱가포르 리전일 경우 SGN , UUID 확인 하여 입력 ncp-iam-authenticator create-kubeconfig --region SGN --clusterUuid c4xx78d > kubeconfig.yml 리전을 잘못 넣을 경우 아래처럼 오류가 난다. kubectl --kubeconfig="kubeconfig.yml" get nodes error: error loading config file "kubeconfig.yml": couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" } 11 kubectl --kubeconfig="kubeconfig.yml" get nodes [root@test-web01 ~]# kubectl --kubeconfig="kubeconfig.yml" get nodes NAME STATUS ROLES AGE VERSION game1-node-pool-w-10om Ready 18h v1.21.9 game1-node-pool-w-10on Ready 18h v1.21.9 11 vi ~/.bash_profile 맨 아래줄에 아래 내용 추가 alias kubectl='kubectl --kubeconfig="/root/kubeconfig.yml"' alias k=kubectl source ~/.bash_profile 12 k get nodes [root@s17f56ff32ee ~]# k get nodes NAME STATUS ROLES AGE VERSION node11-w-1n6 Ready 97m v1.21.9 node11-w-1n7 Ready 97m v1.21.9