Help Center> Multi-Cloud Container Platform> User Guide> Resource Management> Cluster Management> Adding a Cluster of Another Public Cloud to MCP
Updated on 2023-07-07 GMT+08:00

Adding a Cluster of Another Public Cloud to MCP

Prerequisites

  • A cluster of another public cloud cluster is available. The cluster version is v1.13 or later, and the cluster is in the normal state.
  • The cluster can communicate with the MCP network.

Constraints

The cluster to be added must have not been added to an MCP instance. That is, a cluster cannot be added to two or more MCP instances.

MCP cannot distinguish the same cluster using different access modes or different IP addresses to join an MCP instance. For example, if you have added a cluster to an MCP instance through public network and you want to add the cluster again through hub VPC, the cluster can be added but the status will be abnormal. Similar is the case when you have added a cluster to an MCP instance through a public IP address and want to add it again using another public IP address. Therefore, you are not advised to add the same cluster to MCP.

Procedure

  1. Log in to the MCP console. In the navigation pane, choose Resource Management > Cluster Management. On the page displayed, click Add Cluster.
  2. On the Create Cluster page displayed, select a cloud service provider.
  3. Click Next and select an access mode.

    Two options are available:

    • Public network access: MCP accesses the cluster by using an EIP. Ensure that the cluster has an EIP.
    • Hub VPC: MCP connects to the hub VPC through Direct Connect to enable mutual access between MCP and clusters. You must buy a direct connection. For details about hub VPC connections, see Network Description.
    Figure 1 Selecting an access mode

  4. Upload the KubeConfig file.

    • For other public cloud clusters that do not support direct export of KubeConfig files or need tools for parsing, see Obtaining KubeConfig to obtain the KubeConfig file.
    • KUBECONFIG_PATH is the local path for storing the KubeConfig file. In the Linux OS, it defaults to $KUBECONFIG if the environment variables have been set; otherwise, it defaults to $HOME/.kube/config.
    • Upload KubeConfig File: Click Select File to upload the obtained KubeConfig file of the cluster. Ensure that the cluster network in the configuration file is connected. The file can be in YAML or JSON format.
      A KubeConfig file will be generated after a cluster is created. You can download the KubeConfig file from the cluster management page. For example, to download the KubeConfig file of a CCE cluster, log in to the CCE console, choose Resource Management > Clusters in the navigation pane, click the cluster name, and download the KubeConfig file on the kubectl tab page.
      Figure 2 Downloading the KubeConfig file of a CCE cluster
      • Select Context: Select a context.
      • Set Cluster Name: Enter the name of the cluster to be added. The name must be globally unique.

  5. Click OK. The Verify Cluster Admission page is displayed.

    After the verification is successful, click OK.

  6. Click OK. It takes about 1 minute to add a cluster.

    After the cluster is added, you can view the added cluster on the Cluster Management page and the cluster status is Normal.