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.
- The cluster to be added must have not been added to MCP.
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
The following procedure uses an Alibaba Cloud cluster as an example.
- Log in to the MCP console. In the navigation pane, choose Resource Management > Cluster Management. On the page displayed, click Add Cluster.
- On the Add Cluster page displayed, click Alibaba Cloud under Public Clouds in the Select Cloud Service Provider step.
- 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 the MCP and clusters. You must buy a direct connection. For details about hub VPC connections, see Network Description.
Figure 1 Selecting an access mode
- Upload the KubeConfig file.
- 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. For other public cloud clusters that do not support direct export of KubeConfig files or need tools for parsing, see Obtaining KubeConfig.
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.
- 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.
- Click OK. The Verify Cluster Admission page is displayed.
After the verification is successful, click OK.
- 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.
Last Article: Adding a CCE Cluster to MCP
Next Article: Adding an On-Premises Kubernetes Cluster to MCP
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.