Cloud Shell is a web-based command-line tool provided by Alibaba Cloud. You can use Cloud Shell to run commands in a browser to manage Alibaba Cloud resources. This topic describes how to use kubectl on Cloud Shell in the ACK console to manage Container Service for Kubernetes (ACK) clusters.
Prerequisites
Cloud Shell can connect to ACK clusters only from the Internet. Therefore, you must make sure that the API server of the cluster that you want to access is accessible over the Internet. For more information, see Control public access to the API server of a cluster.
Background information
If you want to manage ACK clusters by using kubectl, you must first install and set up the kubectl client. For more information, see Connect to ACK clusters by using kubectl. You can also open Cloud Shell in the ACK console. The system automatically loads the kubeconfig file of the cluster. Then, you can use kubectl on Cloud Shell to manage the cluster without installation or configuration.
Cloud Shell is a web-based command-line tool. You can run Cloud Shell in a browser to manage Alibaba Cloud resources. When you start Cloud Shell, Cloud Shell automatically creates a Linux VM for you. The Linux VM is free of charge. The VM is pre-installed with cloud management tools and system tools, including Python, Java, Node.js, Alibaba Cloud CTI, cURL, SSH, kubectl, Fun, Terraform, Ansible, and Vim. You can use these tools with Web IDE provided by Cloud Shell to manage cloud resources. For more information, see What is Cloud Shell?.
Procedure
Result
For example, you can run the following command to query the pods of the cluster:
kubectl get pod
Expected output:
NAME READY STATUS RESTARTS AGE
nginx-dynamic-5b4bdb64c4-gxqs5 1/1 Running 0 178m
web-0 1/1 Running 0 34d
web-1 1/1 Running 0 34d
