본문 바로가기
Programming/Kubernetes

Rancher on Kubernetes - 2 (Existing cluster import)

by guru_k 2021. 10. 26.
728x90
반응형

Rancher 설치 이후 다른 클러스터를 현재 설치된 Rancher에 연동 시켜 보자.

Import Existing 

Import Existing 버튼 클릭

각각 사용되고 있는 Provider 가 있다면 EKS, AKS, GKE 를 선택하자.

여기선 on-premise 에 설치 된 Cluster를 추가하는 것으로 한다.

Generic 클릭

 

Cluster 추가

Cluster Name: 추가할 Cluster의 Kubernetes api 주소

Cluster Description: Cluster 설명

위에 설명된 명령어들을 입력해서 RBAC 설정을 하자

$ kubectl apply -f https://rancher.io/v3/import/9b6594h6cjkdw5vs282ssgzkzngxmspxwzdmwn84vdrxvr9tnc7zq8_c-m-mwrw6rkt.yaml
clusterrole.rbac.authorization.k8s.io/proxy-clusterrole-kubeapiserver unchanged
clusterrolebinding.rbac.authorization.k8s.io/proxy-role-binding-kubernetes-master unchanged
namespace/cattle-system unchanged
serviceaccount/cattle unchanged
clusterrolebinding.rbac.authorization.k8s.io/cattle-admin-binding unchanged
secret/cattle-credentials-e42d12d created
clusterrole.rbac.authorization.k8s.io/cattle-admin unchanged
deployment.apps/cattle-cluster-agent configured
service/cattle-cluster-agent created


$ kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user kubernetes-admin
clusterrolebinding.rbac.authorization.k8s.io/cluster-admin-binding created

RBAC 설정이 정상적으로 완료되면 자동적으로 Pending 상태에서 Active 상태로 변경이 완료되며 연동이 완료된다.

Cluster 추가

추가 후 메뉴에서 추가된 Cluster의 목록을 볼 수 있다.

Cluster Dashboard

추가된 Cluster 선택 시 위와 같이 Cluster Dashboard에서 간단한 Status들을 확인 할 수 있다.

728x90
반응형

댓글