This is a cache of https://docs.openshift.com/container-platform/4.16/web_console/web_terminal/odc-using-web-terminal.html. It is a snapshot of the page at 2024-11-26T09:07:37.716+0000.
Using the web terminal - Web terminal | Web console | OpenShift Container Platform 4.16
×

You can launch an embedded command line terminal instance in the web console. This terminal instance is preinstalled with common CLI tools for interacting with the cluster, such as oc, kubectl,odo, kn, tkn, helm, and subctl. It also has the context of the project you are working on and automatically logs you in using your credentials.

Accessing the web terminal

After the Web Terminal Operator is installed, you can access the web terminal. After the web terminal is initialized, you can use the preinstalled CLI tools like oc, kubectl, odo, kn, tkn, helm, and subctl in the web terminal. You can re-run commands by selecting them from the list of commands you have run in the terminal. These commands persist across multiple terminal sessions. The web terminal remains open until you close it or until you close the browser window or tab.

Prerequisites
  • You have access to an OpenShift Container Platform cluster and are logged into the web console.

  • The Web Terminal Operator is installed on your cluster.

Procedure
  1. To launch the web terminal, click the command line terminal icon (odc wto icon) in the masthead of the console. A web terminal instance is displayed in the Command line terminal pane. This instance is automatically logged in with your credentials.

  2. If a project has not been selected in the current session, select the project where the DevWorkspace CR must be created from the Project drop-down list. By default, the current project is selected.

    • One DevWorkspace CR defines the web terminal of one user. This CR contains details about the user’s web terminal status and container image components.

    • The DevWorkspace CR is created only if it does not already exist.

    • The openshift-terminal project is the default project used for cluster administrators. They do not have the option to choose another project. The Web Terminal Operator installs the DevWorkspace Operator as a dependency.

  3. Optional: Set the web terminal timeout for the current session:

    1. Click Timeout.

    2. In the field that appears, enter the timeout value.

    3. From the drop-down list, select a timeout interval of Seconds, Minutes, Hours, or Milliseconds.

  4. Optional: Select a custom image for the web terminal to use.

    1. Click Image.

    2. In the field that appears, enter the URL of the image that you want to use.

  5. Click Start to initialize the web terminal using the selected project.

  6. Click + to open multiple tabs within the web terminal in the console.