< img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=3131724&fmt=gif" />

Add Member Cluster via Direct Connection

This section explains how to add member clusters via direct connection.

Prerequisites

  • You should have the platform-admin role in the host cluster.

  • All nodes in the host cluster must be able to access the Kubernetes API service of the member cluster (usually port 6443 on the master node of the member cluster). Depending on your network environment, you may need to configure firewall and traffic forwarding rules.

Get Member Cluster Kubeconfig

  1. On a node in the member cluster, run the following command to get the kubeconfig information of the member cluster:

    kubectl config view --raw
  2. Copy the kubeconfig information and modify the clusters:cluster:server parameter as follows:

    clusters:
    - cluster:
        server: https://<member-cluster-node-ip>:6443

Add Member Cluster

  1. Log in to the KubeSphere web console of the host cluster with a user having the platform-admin role.

  2. Click Cluster Management.

  3. On the Cluster Management page, click Add Cluster.

  4. On the Basic Information tab, set the name, tags, provider, and description for the member cluster, then click Next.

    Parameter Description

    Name

    The name of the member cluster. The name can only contain lowercase letters, numbers, and hyphens (-), must start and end with a lowercase letter or number, and can be up to 63 characters long.

    Tag

    Tags for the member cluster. Select tags from the dropdown list.

    Provider

    The provider of the member cluster. You can select the provider from the dropdown list or enter it manually.

    Description

    Description of the member cluster. The description can contain any characters and can be up to 256 characters long.

    Under Advanced Settings, set the purpose identifier for the cluster.

  5. On the Connection Settings tab, set the Connection Mode to Direct Connection, enter the kubeconfig information of the member cluster in the kubeconfig area, and then click Next.

  6. On the Cluster Configuration tab, configure the cluster settings, and then click Create.

    Once the member cluster is added, it will be displayed in the list of clusters on the Cluster Management page.

Receive the latest news, articles and updates from KubeSphere


Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.