{"id":50047,"date":"2025-07-11T03:49:13","date_gmt":"2025-07-11T03:49:13","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=50047"},"modified":"2026-02-21T07:34:23","modified_gmt":"2026-02-21T07:34:23","slug":"openshift-lab-1-use-the-terminal-window-within-the-red-hat-openshift-web-console","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/openshift-lab-1-use-the-terminal-window-within-the-red-hat-openshift-web-console\/","title":{"rendered":"Openshift: Lab 1 &#8211; Use the terminal window within the Red Hat OpenShift web console"},"content":{"rendered":"\n<p>In this lesson, you will learn how to access the terminal window within the Red Hat OpenShift web console and use it to work with various OpenShift and Kubernetes resources that are available in the OpenShift cluster to which the web console is bound.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What you need to know<\/h3>\n\n\n\n<p>In order to get full benefit from taking this lesson, you need to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Have a basic understanding of the nature and use of Kubernetes as a\u00a0<a href=\"https:\/\/developers.redhat.com\/topics\/containers\" target=\"_blank\" rel=\"noopener\">container<\/a>\u00a0orchestration framework.<\/li>\n\n\n\n<li>Understand the relationship between OpenShift and Kubernetes.<\/li>\n\n\n\n<li>Have a\u00a0basic understanding of the nature and purpose of the\u00a0<code>kubectl<\/code>\u00a0CLI tool.<\/li>\n\n\n\n<li>Know how to access your dedicated instance of the\u00a0<a href=\"https:\/\/developers.redhat.com\/content-gateway\/link\/3881654\" target=\"_blank\" rel=\"noreferrer noopener\">Developer Sandbox<\/a>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">What you will learn<\/h3>\n\n\n\n<p>In this lesson you will learn:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>How to access the terminal window that\u2019s embedded within the OpenShift web console.<\/li>\n\n\n\n<li>How to use the\u00a0<code>kubectl<\/code>\u00a0and\u00a0<code>oc<\/code>\u00a0CLI tools to interact with the various Kubernetes resources within the OpenShift cluster.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\">\n\n\n\n<h3 class=\"wp-block-heading\">Access the terminal window<\/h3>\n\n\n\n<p>To reach the OpenShift terminal window within your no-cost Developer Sandbox cluster, complete the following steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Using your web browser, navigate\u00a0<a href=\"https:\/\/developers.redhat.com\/developer-sandbox?intcmp=7013a000003SqZsAAK\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>\u00a0(Figure 1, Callout 1).<\/li>\n\n\n\n<li>Select\u00a0<strong>Start your sandbox for free<\/strong>\u00a0(Figure 1, Callout 2).\u00a0<a href=\"https:\/\/developers.redhat.com\/sites\/default\/files\/foundations1.12figure1.png\" target=\"_blank\" rel=\"noopener\"><\/a>Figure 1: The entry point for access.<\/li>\n\n\n\n<li>Once you&#8217;re in the OpenShift web console, click the\u00a0<strong>terminal prompt<\/strong>\u00a0icon in the upper right corner of the web page (Figure 2, Callout 1) to display the command-line terminal (Figure 2, Callout 2).\u00a0You can use the terminal window to interact directly with the underlying Kubernetes cluster powering the OpenShift instance.\u00a0<a href=\"https:\/\/developers.redhat.com\/sites\/default\/files\/foundations1.12figure2.png\" target=\"_blank\" rel=\"noopener\"><\/a>Figure 2: The OpenShift web console can display a terminal window that enables direct interaction with the underlying Kubernetes cluster in the OpenShift instance.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"573\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2025\/07\/image-15-1024x573.png\" alt=\"\" class=\"wp-image-50048\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2025\/07\/image-15-1024x573.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2025\/07\/image-15-300x168.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2025\/07\/image-15-768x430.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2025\/07\/image-15-740x414.png 740w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2025\/07\/image-15-355x199.png 355w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2025\/07\/image-15.png 1088w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Work with the oc and kubectl CLI tools from within the terminal window<\/h3>\n\n\n\n<p>The terminal window that\u2019s embedded within the OpenShift web console is a full blown instance of a\u00a0<a href=\"https:\/\/developers.redhat.com\/topics\/linux\/\" target=\"_blank\" rel=\"noopener\">Linux<\/a>\u00a0terminal. There, you can do the same command-line activities you would normally run in a standalone terminal. Also, the OpenShift web console terminal window allows you to work easily with the OpenShift instance and its underlying Kubernetes cluster.<\/p>\n\n\n\n<p>OpenShift has both the\u00a0<code>oc<\/code>\u00a0and\u00a0<code>kubectl<\/code>\u00a0 CLI tools pre-installed and configured to access the underlying Kubernetes cluster within the OpenShift instance. Thus, you can interact with OpenShift and the underlying Kubernetes from the command line.<\/p>\n\n\n\n<p>The\u00a0<code>oc<\/code>\u00a0CLI tool has much of the same functionality that\u00a0<code>kubectl<\/code>\u00a0provides. However,\u00a0<code>oc<\/code>\u00a0can go a bit further and allow you to execute behavior that is special to OpenShift. For example, you can use\u00a0<code>oc<\/code>\u00a0to install an application into OpenShift without having to negotiate the complexities of application deployment in Kubernetes.<\/p>\n\n\n\n<p>The following exercises demonstrate how to use the\u00a0<code>oc<\/code>\u00a0and\u00a0<code>kubectl<\/code>\u00a0CLI tools to execute basic tasks from the terminal window\u2019s command line. The exercises also demonstrate the close relationship between OpenShift and Kubernetes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Get version information<\/h3>\n\n\n\n<p>Run the following command in the OpenShift terminal to get version information about\u00a0<code>oc<\/code>\u00a0CLI tool:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">oc version<\/code><\/span><\/pre>\n\n\n<p><\/p>\n\n\n\n<p>You will see output similar to the following:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-tag\">Client<\/span> <span class=\"hljs-selector-tag\">Version<\/span>: 4<span class=\"hljs-selector-class\">.10<\/span><span class=\"hljs-selector-class\">.6<\/span>\n\n<span class=\"hljs-selector-tag\">Server<\/span> <span class=\"hljs-selector-tag\">Version<\/span>: 4<span class=\"hljs-selector-class\">.10<\/span><span class=\"hljs-selector-class\">.28<\/span>\n\n<span class=\"hljs-selector-tag\">Kubernetes<\/span> <span class=\"hljs-selector-tag\">Version<\/span>: <span class=\"hljs-selector-tag\">v1<\/span><span class=\"hljs-selector-class\">.23<\/span><span class=\"hljs-selector-class\">.5<\/span>+012<span class=\"hljs-selector-tag\">e945<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><\/p>\n\n\n\n<p>The results of the\u00a0<code>oc<\/code>\u00a0<code>version<\/code>\u00a0command display the version numbers of the\u00a0<code>oc<\/code>\u00a0CLI client, the server powering the current OpenShift instance and as well as the version number of the underlying instance of Kubernetes used by the cluster.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">View resources using oc or kubectl<\/h3>\n\n\n\n<p>Run the following command in the OpenShift terminal to get a list of pods running in the current instance of OpenShift using the\u00a0<code>oc<\/code>\u00a0CLI tool:\u00a0<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">oc <span class=\"hljs-keyword\">get<\/span> pods<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><\/p>\n\n\n\n<p>You will receive output similar to the following:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">NAME                                        READY   STATUS    RESTARTS   AGE\n\nworkspace1e8db31dd59c43ef-8585ff4cc-24ww6   2\/2     Running   0          22s<\/code><\/span><\/pre>\n\n\n<p><\/p>\n\n\n\n<p>Run the following command in the OpenShift terminal to get a list of pods running in the current instance of OpenShift using the\u00a0<code>kubectl<\/code>\u00a0CLI tool:\u00a0<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">kubectl <span class=\"hljs-keyword\">get<\/span> pods<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><\/p>\n\n\n\n<p>You will receive output similar to the following:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">NAME                                        READY   STATUS    RESTARTS   AGE\n\nworkspace1e8db31dd59c43ef-8585ff4cc-24ww6   2\/2     Running   0          22s<\/code><\/span><\/pre>\n\n\n<p><\/p>\n\n\n\n<p>Notice that the output from executing\u00a0<code>oc get pods<\/code>\u00a0and\u00a0<code>kubectl get pods<\/code>\u00a0is identical. This is because both\u00a0<code>oc<\/code>\u00a0and\u00a0<code>kubectl<\/code>\u00a0are querying the same underlying Kubernetes cluster to get a list of pods. This is direct evidence of the tight relationship between OpenShift and Kubernetes.\u00a0<\/p>\n\n\n\n<p>Remember, OpenShift is a layer of components that \u201csit on top\u201d of an underlying Kubernetes cluster. The important thing to understand is that the\u00a0<code>oc<\/code>\u00a0CLI tool provides functionality available in the\u00a0<code>kubectl<\/code>\u00a0CLI tool. In many cases, you can use\u00a0<code>oc<\/code>\u00a0and\u00a0<code>kubectl<\/code>\u00a0interchangeably.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Summary<\/h3>\n\n\n\n<p>In this lesson, you learned how to access the terminal window embedded in the OpenShift web console. Also, you learned how to use the terminal window to execute commands using the\u00a0<code>oc<\/code>\u00a0and\u00a0<code>kubectl<\/code>\u00a0CLI tools. You executed both\u00a0<code>oc get pods<\/code>\u00a0and\u00a0<code>kubectl get pods<\/code>\u00a0to list the same set of pods running in the Kubernetes cluster that\u2019s foundational to OpenShift.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this lesson, you will learn how to access the terminal window within the Red Hat OpenShift web console and use it to work with various OpenShift and Kubernetes resources&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5153],"tags":[],"class_list":["post-50047","post","type-post","status-publish","format-standard","hentry","category-openshift"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/50047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=50047"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/50047\/revisions"}],"predecessor-version":[{"id":59094,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/50047\/revisions\/59094"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=50047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=50047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=50047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}