All Products
Search
Document Center

Container Compute Service:Control public access to the API server of a cluster

Last Updated:Aug 21, 2024

You can use an elastic IP address (EIP) to expose the API server of a cluster. After you use an EIP to expose the API server of a cluster, the API server can be accessed over the Internet. You can associate an EIP with the API server of a cluster when you create the cluster or after the cluster is created. This topic describes how to control public access to the API server of a cluster by associating an EIP with or disassociating an EIP from the API server.

Associate an EIP with the API server when you create a cluster

You can click Expose API server with EIP when you create a cluster to expose the API server to public access. For more information about how to create an Alibaba Cloud Container Compute Service (ACS) cluster, see Create an ACS cluster.

image

Associate an EIP with the API server after a cluster is created

If you do not select Expose API Server with EIP when you create a cluster, you can perform the following steps to associate an EIP with the API server after the cluster is created.

  1. Log on to the ACS console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left-side navigation pane, click Cluster Information.

  3. On the Cluster Information page, click the Basic Information tab. In the Cluster Information section, click Associate EIP.

    绑定EIP

  4. In the EIP dialog box, select an EIP and click OK.

    After the EIP is associated with the cluster, a public IP address appears on the right side of the API server Public Endpoint field.

    Important

    The API server restarts after you associate an EIP with the API server. We recommend that you do not perform operations on the cluster during the restart process.

Change or disassociate an EIP

After you associate an EIP, you can change the EIP or disassociate the EIP on the Basic Information tab of the Cluster Information page.

  • Change the EIP: Click Change EIP. In the Change EIP dialog box, select an existing EIP and click OK.

    If no EIP is available, click Create EIP.

  • Disassociate the EIP: click Disassociate EIP. In the Disassociate EIP dialog box, read and confirm the message and click OK.

    Important
    • After you disassociate the EIP from the API server of a cluster, the API server cannot be accessed over the Internet.

    • The API server restarts after you unbind the EIP from the API Server. We recommend that you do not perform operations on the cluster during the restart process.

image