Web Terminal Operator¶
The Web Terminal Operator provides an embedded command-line terminal in the OpenShift web console. It gives developers and administrators quick access to oc, kubectl, and other CLI tools directly from the browser without needing a local terminal or SSH session.
Info
The Web Terminal Operator requires cluster administrator privileges to install, but once installed, any authenticated user can open a terminal session from the web console.
Install the Operator via WebUI¶
- Go to Ecosystem -> Software Catalog -> filter for "Web Terminal" -> click the "Web Terminal" tile (provided by Red Hat)
- Click Install
- Leave all the defaults and click Install
- Wait for the Operator to install
Install the Operator via YAML¶
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: web-terminal
namespace: openshift-operators
spec:
channel: fast
name: web-terminal
source: redhat-operators
sourceNamespace: openshift-marketplace
installPlanApproval: Automatic
Wait for the operator:
The PHASE should show Succeeded.
Using the Web Terminal¶
- Log in to the OpenShift web console
- Click the command-line terminal icon ( >_ ) in the upper-right corner of the console
- Select the project where the terminal workspace will run (a
DevWorkspaceis created in that project) - The terminal session opens in a panel at the bottom of the console
The terminal comes pre-loaded with common CLI tools including oc, kubectl, kn, tkn, helm, subctl, and odo.
Tip
The terminal session runs as a DevWorkspace pod in the selected project. Sessions have configurable idle timeouts — by default, inactive terminals are shut down after 15 minutes.
Configure Idle Timeout¶
To change the default idle timeout, edit the DevWorkspace operator configuration:
apiVersion: workspace.devfile.io/v1alpha1
kind: DevWorkspaceOperatorConfig
metadata:
name: devworkspace-operator-config
namespace: openshift-operators
spec:
workspace:
idleTimeout: 30m
Configure Network Policies¶
If your cluster uses network policies that restrict pod communication, the web terminal workspace pods need to be able to reach the OpenShift API server. If terminals fail to connect, ensure the namespace where the terminal runs allows egress to the API server.
Uninstall¶
To remove the Web Terminal Operator:
- Go to Ecosystem -> Installed Operators -> Web Terminal
- Click the Actions menu -> Uninstall Operator
- Clean up any remaining
DevWorkspaceresources:
Verify¶
oc get csv -n openshift-operators | grep web-terminal
oc get pods -n openshift-operators -l app.kubernetes.io/part-of=web-terminal-operator
The operator pod should be in Running state, and the web terminal icon should be visible in the console toolbar.