This topic describes how to use kubectl on Cloud Shell to manage Kubernetes clusters in the Container Service console.

Prerequisites

You have created a Kubernetes cluster. For more information, see Create Kubernetes clusters.

Background information

To use kubectl to manage Kubernetes clusters, you can download kubectl to your local computer. For more information, see Connect to Kubernetes clusters through kubectl. You can also open Cloud Shell in the Container Service console and use kubectl commands to manage Kubernetes clusters.

Procedure

  1. Log on to the Container Service console.
  2. In the left-side navigation pane, choose Clusters to go to the Clusters page.
  3. Select the target cluster and choose More > Open Cloud Shell in the Actions column.
    Manage clusters
    Note

    Perform the following steps:

    • On the Authorization page, click OK to obtain a temporary AccessKey that expires in one hour.
    • On the Storage Space page, click Create Now or Skip as needed.
  4. Use kubectl commands to manage Kubernetes clusters on Cloud Shell.
    Note When you open Cloud Shell, the system automatically loads the kubeconfig file of the cluster. You can use kubectl commands to manage the cluster.
    Manage clusters