Illumina Innovates with Rancher and Kubernetes
When managing an imported cluster, Rancher connects to a Kubernetes cluster that has already been set up. Therefore, Rancher does not provision Kubernetes, but only sets up the Rancher agents to communicate with the cluster.
Keep in mind that editing your Kubernetes cluster still has to be done outside of Rancher. Some examples of editing the cluster include adding and removing nodes, upgrading the Kubernetes version, and changing Kubernetes component parameters.
If your existing Kubernetes cluster already has a cluster-admin role defined, you must have this cluster-admin privilege to import the cluster into Rancher.
cluster-admin
In order to apply the privilege, you need to run:
kubectl create clusterrolebinding cluster-admin-binding \ --clusterrole cluster-admin \ --user [USER_ACCOUNT]
before running the kubectl command to import the cluster.
kubectl
By default, GKE users are not given this privilege, so you will need to run the command before importing GKE clusters. To learn more about role-based access control for GKE, please click here.
Use Member Roles to configure user authorization for the cluster.
kubectl get nodes
certificate signed by unknown authority
curl
Result:
Default
default
System
cattle-system
ingress-nginx
kube-public
kube-system
Note: You can not re-import a cluster that is currently active in a Rancher setup.