All Products
Search
Document Center

Container Service for Kubernetes:Connect to ACK clusters with kubectl on Workbench or Cloud Shell

Last Updated:Jun 17, 2026

Run kubectl commands from your browser with automatic kubeconfig loading — no local tools required.

Tool Network access When to use
[Workbench](https://www.alibabacloud.com/help/en/document_detail/108412.html) Public network and internal network For clusters on an internal network, or when you need a remote connection to an Elastic Compute Service (ECS) instance.
[Cloud Shell](https://www.alibabacloud.com/help/en/document_detail/90256.html) Public network only For clusters with public access enabled, when you need a pre-configured Linux environment with common languages and CLI tools.
Cloud Shell creates a Linux VM valid for one hour. The VM terminates immediately on expiration. After 30 minutes of inactivity or after all session windows are closed, the VM is destroyed within 15 minutes. Starting Cloud Shell again creates a new VM.

Prerequisites

Before you begin, make sure you have:

  • An ACK cluster is created. For public access, associate an EIP with the API server.

  • (For RAM users) Required cluster management and Container Service permissions are granted.

  • (For RAM users on Cloud Shell) AliyunCloudShellFullAccess is granted. To mount a NAS file system, also grant AliyunNASFullAccess.

Connect with Workbench

For clusters accessible over an internal network, or when you don't need a pre-configured Linux environment.

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

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

  3. On the Cluster Information page, click Manage Clusters Using Workbench.

  4. Verify the connection:

    kubectl get namespace

    A successful connection lists your cluster namespaces with Active status:

    NAME              STATUS   AGE
    default           Active   3h14m
    kube-node-lease   Active   3h14m
    kube-public       Active   3h14m
    kube-system       Active   3h14m

Connect with Cloud Shell

For clusters with public network access enabled.

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

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

  3. On the Cluster Information page, click Open Cloud Shell.

  4. (Optional) Mount a NAS file system to persist files across sessions. Without one, files are lost when the VM terminates. Click cloudshell.png, click Mount File Storage, and follow the on-screen instructions.

  5. Verify the connection:

    kubectl get namespaces

    A successful connection lists your cluster namespaces with Active status:

    NAME              STATUS   AGE
    default           Active   3h14m
    kube-node-lease   Active   3h14m
    kube-public       Active   3h14m
    kube-system       Active   3h14m

Next steps