Add the Kubernetes Cluster

Updated

Add the Kubernetes cluster. If you want to access the cluster using a different set of credentials, add the cluster again with the different credentials.

In Rancher-managed environments, adding a Kubernetes cluster will fail for the endpoint that is displayed on the Rancher console. Only a Kubernetes API server endpoint is supported for adding a Kubernetes cluster. The Kubernetes API server endpoint can be found in the Rancher API section.

Procedure

  1. From the navigation pane, go to Protect > Kubernetes.

    The Clusters page appears.

  2. Click Add cluster.

    The Add cluster page appears.

  3. In the API server endpoint box, enter the API server endpoint URL.

    Typically, the URL is https://kube-apiserver:kube-apiserver_port_number. If you do not know the URL, you can use the kubectl config view command.

  4. In the Name box, type a name for the cluster.

  5. Select the authentication method:

    • Service account: Enter the Kubernetes service account name, and then copy the token into the Service token box.

      A Kubernetes service account that is used to access Kubernetes must have the cluster admin role assigned.

    • User name and password: Enter the user name and password.

  6. From the Access node list, select the access node to use for the cluster.

    To configure a new access node for the cluster, click Configure access node.

  7. Click Save.

Hardware Specifications for the Access Node