Logging In to a Container Using CloudShell
If unexpected problems occur when you use a container, you can use CloudShell to log in to the container for debugging.
Constraints
- Only instances in the Running state support remote login.
- Remote login is available in CN North-Beijing4, CN East-Shanghai1, CN South-Guangzhou, AP-Singapore, ME-Riyadh, TR-Istanbul, AF-Johannesburg, and LA-Mexico City2.
- Using CloudShell to access containers is only available in the following regions: CN North-Beijing1, CN North-Beijing4, CN North-Ulanqab1, CN East-Shanghai1, CN East-Shanghai2, CN South-Guangzhou, CN Southwest-Guiyang1, and AP-Singapore. For details, see the console.
For other regions, use the remote login function developed by CAE to access the container.
- CloudShell does not support account or sub-project agencies.
- If you use the CloudShell remote login function for the first time, log in to CloudIDE as an administrator and grant the CloudIDE AgencyAccess, VPC Administrator, and VPCEndpoint Administrator permissions to CloudIDE. Authorization method:
After you log in to the CAE console as an administrator and use the CloudShell remote login function for the first time, click Agree on the service authorization page. After the authorization is complete, CloudIDE creates an agency named cloudide_admin_trust on IAM. To ensure normal service usage, do not delete or modify cloudide_admin_trust when using CloudIDE. Permissions are described as follows: CloudIDE AgencyAccess: permissions to create tenant agencies on CloudIDE.
- VPC Administrator: VPC administrator.
- VPCEndpoint Administrator: VPC Endpoint allows you to privately connect your VPC to a supported service.
Remote Login
- Log in to CAE.
- Choose Instance List.
- Select the target environment and application from the drop-down lists in the upper part of the page, and click the target component.
- Select the target instance and click Remote Login in the Operation column. A shell is required for executing commands. The common shells are /bin/bash (rich functions) and /bin/sh (simple functions). You need to select a shell based on the deployed container. If the deployed container supports both /bin/sh and /bin/bash, /bin/bash is recommended.
- In the displayed dialog box, select the command to be executed.
- /bin/sh
- /bin/bash
- Click Confirm.
- Switch to CloudShell, initialize kubectl, and run the kubectl exec command to log in to the container.
Wait until the kubectl exec command is automatically executed.
Figure 1 Running the kubectl exec command to log in to the container
- Run commands in CloudShell as required to view and debug your container.
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