Connecting to a Cluster Using CloudShell
CloudShell is a web-based shell tool that simplifies the management and maintenance of cloud resources. It offers an instant, pre-configured environment, allowing you to manage clusters without needing to install, configure, or maintain kubectl locally.
Prerequisites
The CoreDNS add-on has been installed in the cluster.
Constraints
- When using kubectl in CloudShell, the kubectl permissions are determined by the login user.
- CloudShell cannot be used by delegated accounts or in sub-projects.
- The kubectl certificate in CloudShell is valid for one day. You can reset the validity period by accessing CloudShell from the CCE console.
Procedure
kubectl is pre-installed and configured in CloudShell and connects to the target cluster by default. You can manage cluster resources by running kubectl commands directly from the CloudShell console.
- Log in to the CCE console. In the navigation pane, choose Permissions.
- In the cluster list on the right, locate the target cluster and click Kubectl Shell on the right to use CloudShell.
Figure 1 CloudShell
- Log in to CloudShell and run the following command to check whether kubectl in CloudShell has connected to the target cluster:
kubectl cluster-info # Check the cluster information.
If the information below is displayed, kubectl in CloudShell has connected to the cluster. You can then run kubectl commands to manage cluster resources.
Kubernetes control plane is running at https://xx.xx.xx.xx:5443 CoreDNS is running at https://xx.xx.xx.xx:5443/api/v1/namespaces/kube-system/services/coredns:dns/proxy To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot