Updated on 2024-12-31 GMT+08:00

Configuring kubectl

With kubectl configured, you can use the command line tool to manage your Kubernetes clusters by running kubectl commands. Follow these steps to configure kubectl.

  1. Log in to the ModelArts console. From the navigation pane, choose AI Dedicated Resource Pools > Elastic Clusters. Click the ModelArts Lite tab.
  2. Click the created dedicated resource pool to access its details page.

    Figure 1 Basic information

  3. Click the CCE cluster to access its details page. From there, locate Connection Information in the cluster information.

    Figure 2 Connection Information

  4. Use kubectl.

    • To use kubectl through the intranet, install it on a node within the same VPC as the cluster. Click Configure next to kubectl. Perform operations as prompted.
      Figure 3 Using kubectl through the intranet
    • To use kubectl through an EIP, install it on any node that associated with the EIP.
      To bind an EIP, click Bind next to EIP.
      Figure 4 Binding an EIP

      Choose or create an EIP.

      After the EIP is bound, locate Connection Information in the cluster information and click Configure next to kubectl.

      Perform operations as prompted.

      Figure 5 Configuring kubectl

  5. Verify the configuration.

    Run this command on the node where kubectl is installed. If the cluster node is displayed, the configuration is successful.

    kubectl get node