All Products
Search
Document Center

Container Service for Kubernetes:Connect to clusters

Last Updated:Jun 23, 2026

Connect to the API server of an ACK cluster over the Internet or internal network. In addition to the console, use command-line tools to interact with the API server, including kubectl, Workbench, and CloudShell.API server of an ACK cluster over the Internet or internal network, and manage API server access with kubeconfig files.

1. Configure the network mode and network ACLs for access to an ACK cluster

Connect to the API server of an ACK cluster over the Internet or an internal network and configure network access control lists (ACLs) for the API server.

  • Connection over an internal network: When you create an ACK cluster, ACK creates an internal-facing Classic Load Balancer (CLB) instance with an internal endpoint for the API server. Resources in the same virtual private cloud (VPC) can communicate with each other.

  • Connection over the Internet: Associate an elastic IP address (EIP) with the internal-facing CLB instance created for the API server to enable Internet access to the cluster. See Control public access to the API server of a cluster.

To prevent unauthorized access to the API server of an ACK cluster, we recommend that you configure network ACLs for the listener port 6443 of the CLB instance created for the API server. You can configure network ACLs as whitelists or blacklists to limit access to the API server. See Configure network ACLs for the API server of an ACK cluster.

2. Manage kubeconfig files

Obtain the kubeconfig file before connecting to a cluster. The kubeconfig file stores credentials for authenticating access over the Internet or an internal network. ACK issues kubeconfig files for Alibaba Cloud accounts, Resource Access Management (RAM) users, or RAM roles. To reduce security risks, we recommend that you use temporary kubeconfig files and carefully configure their validity periods. See Kubeconfig file management.

3. Select cluster connection methods

Select a connection method based on factors such as whether the cluster has Internet access.

Before a RAM user connects to an ACK cluster, grant cluster operation permissions in addition to the required Container Service system permissions. See Authorization.

References

If applications in an ACK cluster need to access external resources over the Internet, such as pulling images or updating dependency libraries, see Enable an existing ACK cluster to access the Internet.