Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Cluster tooling updates and more in Red Hat OpenShift's Web Terminal Operator 1.3

August 19, 2021
Josh Pinkney Angel Misevski
Related topics:
Operators
Related products:
Red Hat OpenShift

Share:

    The Web Terminal Operator in Red Hat OpenShift provides a web terminal with common cluster tooling pre-installed. The operator gives you the power and flexibility to work with your product directly through the OpenShift web console, eliminating the need to have all your tooling installed locally.

    This article is an overview of the new features introduced in Web Terminal Operator 1.3. These improvements include depending on the newly released DevWorkspace Operator, adding support for saving your home directory, and updating our tooling to be compatible with OpenShift 4.8.

    DevWorkspace Operator dependency

    Previously, the Web Terminal Operator relied on an embedded version of the DevWorkspace controller to provide support for web terminals. That meant that in order to get the latest and greatest changes for the DevWorkspace controller, you had to wait three months for a new Web Terminal Operator release. As of Web Terminal 1.3, we have extracted that dependency, released the DevWorkspace Operator as its own separate operator, and now depend on that for providing support for web terminals. What this means for you is that the engine “under the hood” (the DevWorkspace Operator) will be updated every six weeks, instead of the standard three-month schedule for the Web Terminal Operator.

    Saving your home directory

    With Web Terminal 1.3, you will be able to mount your home directory and persist changes to your web terminal over multiple restarts. This feature isn’t enabled by default and it requires some additional configuration. This additional configuration depends on whether or not you already have a web terminal.

    Note: Only a web terminal that has a volume and volume mount for /home/user will persist the home directory. Details follow.

    If you already have a web terminal

    In order to persist the home directory over multiple restarts, you will need to update the custom resource to mount a volume into the web terminal tooling container:

    First, get your web terminal custom resource in your namespace and open it up for editing:

    oc get dw -n ${your_namespace}
    oc edit dw ${your web terminal name} -n ${your_namespace}

    Now that you have your custom resource open for editing, modify the DevWorkspace custom resource components section to add a mount for the storage. This can be done by first defining a volume in spec.template.components and then mounting that volume in the web terminal tooling container. The highlighted portion of the YAML file in Figure 1 shows what you need to add in order to get the mount.

    The configuration of your DevWorkspace must have a section mounting the /home/user directory
    Figure 1: Configuration file with a section mounting the /home/user directory.

    Once your custom resource has been edited and saved, you can start a new web terminal and create changes under /home/user. Your changes will persist over multiple restarts.

    Note: If you are editing the custom resource inside a web terminal, the web terminal will automatically apply the changes and then close the active web terminal. To reopen the web terminal with the changes applied, click the Restart Terminal button.

    If you don’t already have a web terminal

    In order to persist the home directory if you don’t already have a web terminal, you can edit your configuration file and add the following fields. In the YAML shown, replace ${your namespace} with the namespace where you want to create the web terminal.

    Note: If you are an admin, you must create your web terminal in openshift-terminal, otherwise you will not be able to connect to the web terminal through the OpenShift web console. If the openshift-terminal namespace does not currently exist, you must start your first web terminal through the UI so that the namespace is provisioned.

    kind: DevWorkspace
    apiVersion: workspace.devfile.io/v1alpha2
    metadata:
      name: web-terminal
      namespace: ${your namespace}
      annotations:
        controller.devfile.io/restricted-access: "true"
      labels:
        console.openshift.io/terminal: "true"
    spec:
      started: true
      routingClass: 'web-terminal'
      template:
        components:
        - name: web-terminal-exec
          plugin:
            kubernetes:
              name: web-terminal-exec
              namespace: openshift-operators
        - name: web-terminal-tooling
          plugin:
            kubernetes:
              name: web-terminal-tooling
              namespace: openshift-operators
            components:
            - name: web-terminal-tooling
              container:
                volumeMounts:
                - name: home-storage
                  path: "/home/user"
        - name: home-storage
          volume: {}

    Once your web terminal custom resource has been created, you can start a web terminal and all your changes under /home/user will be persisted by default.

    Tooling update

    We have updated the default binaries in Web Terminal Operator 1.3 to include the latest versions of the built-in command-line tools, as shown in Table 1.

    Table 1: Command-line tools in Web Terminal Operator 1.3.
    Binary Old version New version
    oc 4.7.0 4.8.2
    kubectl v1.20.1 v0.21.0-beta.1
    odo 2.0.4 2.2.3
    knative 0.19.1 0.21.0
    tekton 0.15.0 0.17.2
    kubectx v0.9.3 v0.9.4
    kubens v0.9.3 v0.9.4
    rhoas 0.24.1 0.25.0
    submariner   0.9.1 (First release)

    Try out these features

    In Web Terminal 1.3 we have changed the default channel from alpha to fast. This means that you’ll have to go through some extra steps to try out these new features:

    • If your cluster already has the Web Terminal Operator installed, uninstall it by following the uninstall instructions and re-install the Web Terminal Operator using the fast channel.
    • If your cluster does not have the Web Terminal Operator installed, install it using the fast channel.

    Additional resources

    For a peek into how the Web Terminal Operator works under the hood, please see A deeper look at the Web Terminal Operator by Angel Misevski. You can also check out the initial release article by Joshua Wood: Command-line cluster management with Red Hat OpenShift’s new web terminal. For a look at our previous release blog, read What’s new in Red Hat OpenShift's Web Terminal Operator 1.2.

    Last updated: September 19, 2023

    Related Posts

    • What's new in Red Hat OpenShift's Web Terminal Operator 1.2

    • Command-line cluster management with Red Hat OpenShift's new web terminal (tech preview)

    Recent Posts

    • Container starting and termination order in a pod

    • More Essential AI tutorials for Node.js Developers

    • How to run a fraud detection AI model on RHEL CVMs

    • How we use software provenance at Red Hat

    • Alternatives to creating bootc images from scratch

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue