Help Center/ Cloud Application Engine/ User Guide/ Instance Management/ Logging In to a Container Using CloudShell
Updated on 2024-05-25 GMT+08:00

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.

Only instances in the Running state support remote login.

Procedure

  1. Log in to CAE.
  2. Choose Instance List.
  3. Select the target environment and application from the drop-down lists in the upper part of the page, and click the target component.
  4. Select the target instance and click Remote Login in the Operation column.
  5. In the displayed dialog box, select the command to be executed.

    • /bin/sh
    • /bin/bash
    Figure 1 Login command

  6. Click Confirm.
  7. 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 2 Running the kubectl exec command to log in to the container

  8. Run commands in CloudShell as required to view and debug your container.