You can add a purchased Elastic Compute Service (ECS) instance to a specified cluster.
Note: At most 20 ECS instances can be added to a cluster by default. To add more ECS instances, open a new ticket.
You can add an existing ECS instance in the following ways:
- Add ECS instances automatically: The image and system disk of the ECS instance are reset by using this method. You can add one or more ECS instances to the cluster at a time.
- Add the ECS instance manually: Manually add the ECS instance by running scripts on the ECS instance. You can only add one ECS instance to the cluster at a time.
If you have not created a cluster before, create a cluster first. For information about how to create a cluster, see Create a cluster.
The ECS instance to be added must be in the same region and use the same network type (classic or Virtual Private Cloud (VPC)) as the cluster.
When adding an existing ECS instance, make sure that your ECS instance has a public IP if the network type is classic or an Elastic IP (EIP) if the network type is VPC, or the corresponding VPC has configured the NAT gateway. In short, make sure the corresponding node can access public network normally. Otherwise, the ECS instance fails to be added.
The ECS instance to be added must be under the same account as the cluster.
If you select to manually add the ECS instance, note that:
If you have already installed Docker on your ECS instance, the ECS instance might fail to be added. We recommend uninstalling Docker and removing the Docker folders before adding the ECS instance by running the following command:
apt-get remove -y docker-engine,
rm -fr /etc/docker/ /var/lib/docker /etc/default/docker
yum remove -y docker-engine,
rm -fr /etc/docker /var/lib/docker
Container Service nodes have special requirements for the operating system of the ECS instance. We recommend using Ubuntu 14.04/16.04 or CentOS 7 as the operating system. We have strictly tested the stability and compatibility of these operating systems.
Log on to the Container Service console.
Click Clusters in the left-side navigation pane.
On the Cluster List page, click More at the right of the cluster that you want to add ECS instances and then select Add Existing Instances from the list.
Add ECS instances.
The ECS instances displayed are filtered and synchronized from your ECS instance list according to the region and network type defined by the cluster.
Add the ECS instances in the following ways:
Add ECS instances automatically.
Note: As this method will reset the image and system disk of the ECS instance, proceed with caution. Create a snapshot to back up your data before adding the ECS instance. For information about how to create a snapshot, see Create a snapshot.
Select the ECS instances you want to add to the cluster and click Next Step.
You can add one or more ECS instances at a time.
Configure the instance information. Click Next Step and then click Confirm in the confirmation dialog box.
Manually add the ECS instance by running scripts on the ECS instance.
Select Manually Add. Select an ECS instance, and then click Next Step.
You can only add one ECS instance at a time.
Confirm the instance information and click Next Step.
The scripts unique to this ECS instance are displayed. Click log on to the ECS instance xxxxxx.
The VNC connection password is displayed in the dialog box. Copy the password and click Close.
In the dialog box, enter the VNC connection password and click OK.
Enter the logon account (root) and password of the ECS instance, and press Enter to log on to the ECS instance.
Click Input Commands. Paste the preceding scripts into the dialog box, click OK and press Enter.
The system runs the scripts. Wait until the scripts are successfully run. A success message is displayed. The ECS instance is successfully added.
You can modify the VNC connection password of the ECS instance in the remote terminal connection page. Click Modify Management Terminal Password, enter the new password and click OK in the dialog box.