The Web Terminal Operator allows you to start a terminal inside of your browser with common CLI tools for interacting with the cluster.
Note: The OpenShift console integration that allows easily creating web terminal instances and logging in automatically is available in OpenShift 4.5.3 and higher. In previous versions of OpenShift, the operator can be installed but web terminals will have to be created and accessed manually.
After installing the Web Terminal operator, you can use the web terminal by first clicking on the terminal button in the top right of the OpenShift console
This will open up a web terminal at the bottom of your screen. This terminal will automatically be logged in as your OpenShift user and have tools like oc
, kubectl
, odo
, Knative, Tekton, Helm, kubens
, and kubectx
pre-installed.
Once you are logged into the terminal, you can type the help
command to see a list of installed CLI tools. The tooling image also comes with a utility named wtoctl
to aid in customizing the running web terminal. See wtoctl help
for available commands.
The Web Terminal can be installed via OperatorHub on Openshift Clusters. To install, press the Install button, choose the upgrade strategy, and wait for the Installed Operator status.
When the operator is installed, and you refresh your page, you will see a terminal button appear on the top right of the console.
Parts of the operator must be manually uninstalled for security purposes. It also allows you to save cluster resources, as terminals cannot be idled when the operator is uninstalled. In order to fully uninstall an admin must also remove the DevWorkspace Operator, which is installed with the Web Terminal Operator as a dependency.
kubectl delete devworkspaces.workspace.devfile.io --all-namespaces \
--selector 'console.openshift.io/terminal=true' --wait
kubectl delete devworkspacetemplates.workspace.devfile.io --all-namespaces \
--selector 'console.openshift.io/terminal=true' --wait
kubectl delete devworkspaces.workspace.devfile.io --all-namespaces --all --wait
kubectl delete devworkspaceroutings.controller.devfile.io --all-namespaces --all --wait
kubectl delete customresourcedefinitions.apiextensions.k8s.io devworkspaceroutings.controller.devfile.io
kubectl delete customresourcedefinitions.apiextensions.k8s.io devworkspaces.workspace.devfile.io
kubectl delete customresourcedefinitions.apiextensions.k8s.io devworkspacetemplates.workspace.devfile.io
kubectl delete customresourcedefinitions.apiextensions.k8s.io devworkspaceoperatorconfigs.controller.devfile.io
kubectl get customresourcedefinitions.apiextensions.k8s.io | grep "devfile.io"
devworkspace-webhook-server
deployment along with mutating and validating webhooks:
kubectl delete deployment/devworkspace-webhook-server -n openshift-operators
kubectl delete mutatingwebhookconfigurations controller.devfile.io
kubectl delete validatingwebhookconfigurations controller.devfile.io
Remove any remaining services, secrets, and config maps. Depending on the installation, some resources included in the following command may not exist on the cluster.
kubectl delete all --selector 'app.kubernetes.io/part-of=devworkspace-operator,app.kubernetes.io/name=devworkspace-webhook-server'
kubectl delete serviceaccounts devworkspace-webhook-server -n openshift-operators
kubectl delete configmap devworkspace-controller -n openshift-operators
kubectl delete clusterrole devworkspace-webhook-server
kubectl delete clusterrolebinding devworkspace-webhook-server