Openshift Console Setup and Management Guide

Author

Reads 892

Close up of a Dashboard
Credit: pexels.com, Close up of a Dashboard

The Openshift Console is a game-changer for managing your Kubernetes clusters. It provides a single, intuitive interface for deploying, scaling, and monitoring applications.

The Openshift Console is built on top of the Kubernetes API, allowing you to manage your clusters with ease. You can access the console by navigating to the cluster's URL in your web browser.

To get started with the Openshift Console, you'll need to have an Openshift cluster up and running. This can be done using the Openshift CLI or the web console itself.

See what others are reading: Openshift vs Kubernetes

Getting Started

The OpenShift console is a web-based user interface that allows you to manage your applications and infrastructure in a single place.

To access the OpenShift console, you'll need to log in with your credentials, which can be found in the "Accessing the OpenShift Console" section.

You can access the console by navigating to the URL provided in the "Installation and Configuration" section.

From the console, you'll see a dashboard that gives you an overview of your projects and applications.

To get started, you'll need to create a new project, which can be done by clicking on the "Create Project" button in the top right corner of the dashboard.

You can also import an existing project from a Git repository, as described in the "Importing Projects" section.

1. Accessing

Credit: youtube.com, Openshift Web Console

Accessing the OpenShift Console is a breeze. You can access it from a web browser, and it's a user interface that lets you visualize, browse, and manage the contents of your projects.

To use the web console, JavaScript must be enabled in your browser, and it's recommended to use a browser that supports WebSockets for the best experience.

Review the OpenShift Container Platform 4.x Tested Integrations page before creating the supporting infrastructure for your cluster.

The web console runs as a pod on the master, and the static assets required to run it are served by the pod. Once OpenShift is successfully installed, find the URL for the web console and login credentials in the CLI output of the installer.

Here are the prerequisites you need to meet:

  • JavaScript must be enabled in your browser.
  • Review the OpenShift 4.x Tested Integrations page before creating the supporting infrastructure for your cluster.

To access the web console, log in using your login credentials, which you can find in the CLI output of the installation program.

Configuring the Console

Credit: youtube.com, Ask an OpenShift Admin (Ep 47): Console features and customization

Configuring the Console is a crucial step in customizing your OpenShift experience. You can modify the OpenShift Container Platform web console to set a logout redirect URL or disable the console.

To configure the console, you'll need to have administrator privileges. This is a requirement to make any changes to the console settings.

You can configure the web console settings by editing the console.config.openshift.io resource. This is the key to unlocking the customization options for your console.

The console.config.openshift.io resource has several settings that can be modified. One of the most important settings is the logoutRedirect URL. This URL determines where users are redirected after logging out of the web console.

The logoutRedirect URL can be specified by editing the console.config.openshift.io resource. If you don't specify a value, users will return to the login page for the web console.

Here are the steps to edit the console.config.openshift.io resource:

  • Edit the console.config.openshift.io resource: `$ oc edit console.config.openshift.io cluster`
  • Specify the URL of the page to load when a user logs out of the web console.
  • The web console URL cannot be modified. If you try to modify it, the cluster will reset it to the default value.

Customizing the Console

You can customize the OpenShift Container Platform web console to meet specific corporate or government requirements.

Credit: youtube.com, Customize Openshift 4 web console - Custom notification banners in openshift 4

The web console can be customized to set a custom logo, product name, links, notifications, and command line downloads.

To add a custom logo, you must have administrator privileges and create a file of the logo that you want to use.

The logo can be a file in any common image format, including GIF, JPG, PNG, or SVG, and is constrained to a max-height of 60px.

To import your logo file into a ConfigMap in the openshift-config namespace, use the command `oc create configmap console-custom-logo --from-file ~/path/to/console-custom-logo.png -n openshift-config`.

You can also customize the Operator configuration to include customLogoFile and customProductName.

To do this, edit the web console’s Operator configuration with the command `oc edit console.operator.openshift.io clusterapiVersion: operator.openshift.io/v1` and update the specification with the custom logo file and product name.

The custom logo ConfigMap will then be synced into the console namespace, mounted to the console pod, and redeployed.

If there are any issues, the console cluster operator will report Degraded, and the console Operator configuration will also report CustomLogoDegraded.

A different take: Openshift Command Line

Credit: youtube.com, Customizing Openshift4 web console - Custom logo and product name

You can check the clusteroperator with the command `oc get clusteroperator console -o yaml` and the console Operator configuration with the command `oc get console.operator.openshift.io -o yaml`.

Custom links can also be added to the web console.

To do this, go to Administration → Custom Resource Definitions, click on ConsoleLink, and click YAML to edit the file.

You can specify the href, location, and text for the custom link.

Valid location settings are HelpMenu, UserMenu, and ApplicationMenu.

You can also customize the login page with custom Terms of Service information and custom login pages.

To do this, run the commands `oc adm create-login-template > login.html`, `oc adm create-provider-selection-template > providers.html`, and `oc adm create-error-template > errors.html` to create templates you can modify.

Create the secrets with the commands `oc create secret generic login-template --from-file=login.html -n openshift-config`, `oc create secret generic providers-template --from-file=providers.html -n openshift-config`, and `oc create secret generic error-template --from-file=errors.html -n openshift-config`.

You can also create custom notification banners.

To do this, go to Administration → Custom Resource Definitions, click on ConsoleNotification, and click YAML to edit the file.

Credit: youtube.com, Ask an OpenShift Admin (Ep 47): Console features and customization

You can specify the backgroundColor, color, link, and text for the custom notification banner.

Valid location settings are BannerTop, BannerBottom, and BannerTopBottom.

Here is a summary of the valid location settings for custom links and notification banners:

Developer Perspective

The Developer Perspective in the OpenShift Console is a game-changer for developers. It provides workflows specific to developer use cases.

To access the Developer Perspective, you need to log in to the web console first. You can do this by using your login credentials. The default view for the OpenShift Console is the Administrator Perspective, so you'll need to switch to the Developer Perspective using the perspective switcher.

Once you've switched to the Developer Perspective, you'll see the Topology view with options to create an application. This view allows you to create and deploy applications on OpenShift Container Platform using existing codebases, images, and dockerfiles. You can also use it to visually interact with applications, components, and services associated with them within a project and monitor their deployment and build status.

Here are some key features of the Developer Perspective:

  • Create and deploy applications on OpenShift Container Platform
  • Visually interact with applications, components, and services
  • Group components within an application and connect them
  • Integrate serverless capabilities (Technology Preview)
  • Create workspaces to edit your application code using Eclipse Che

Developer Perspective

Credit: youtube.com, Report Desk - Developer Perspective

The Developer Perspective in the OpenShift Container Platform web console provides workflows specific to developer use cases.

To access the Developer perspective, you need to log in to the web console first. The default view for the web console is the Administrator perspective.

You can switch to the Developer perspective using the perspective switcher. The Topology view with options to create an application is displayed.

From the Developer perspective, you can create and deploy applications on OpenShift Container Platform by importing existing codebases, images, and dockerfiles.

You can also visually interact with applications, components, and services associated with them within a project and monitor their deployment and build status.

The Developer perspective allows you to group components within an application and connect the components within and across applications.

Here are some key features of the Developer perspective:

  • Create and deploy applications on OpenShift Container Platform
  • Visually interact with applications, components, and services
  • Group components within an application and connect them
  • Integrate serverless capabilities (Technology Preview)
  • Create workspaces to edit your application code using Eclipse Che

The web console runs as a pod on the master, and the static assets required to run the web console are served by the pod.

Suggestion: Pods in Openshift

Run on 4.0.0 Cluster

Credit: youtube.com, Develop a Multi-Monitor Application with Perspective & Perspective Workstation

Running on a 4.0.0 cluster is a straightforward process. The console operator is installed by default and will automatically maintain a console.

You can now focus on your development work without worrying about setting up a console. The console operator takes care of it for you.

Adding your fork to the repo as a remote is the next step. Simply follow the instructions and add it as a remote.

With your fork added as a remote, you can now easily sync your changes and collaborate with others. This is especially useful when working on a team project.

Development on 4.0 Dev Cluster

Developing on a 4.0 Dev Cluster is a straightforward process. You'll need to run your code against a dev cluster to develop features for the console-operator.

The console-operator expects to be running in a container, which makes it difficult to fake a local environment. This is why you'll need to deploy your code in a new container on the dev cluster.

A laptop displaying an analytics dashboard with real-time data tracking and analysis tools.
Credit: pexels.com, A laptop displaying an analytics dashboard with real-time data tracking and analysis tools.

Redeploying your container might seem like a hassle, but it's intended to provide a quick feedback loop. This allows you to test and iterate on your code quickly.

To set yourself up for success, build and deploy your binary and deploy a new container frequently. This will give you a chance to test your changes in a real-world environment.

Now you're ready to build and deploy the operator with your changes.

Manifest Changes

Making changes to manifests can be a bit tricky, but it's a crucial part of the development process. If you're making changes to the manifests, you'll need to apply the manifest using oc apply.

I've found that this step is often overlooked, but it's essential to ensure that your changes are reflected in the cluster. Applying the manifest is a straightforward process, but it's easy to forget to do it.

Managing the Console

To disable the default console operator, simply delete the CVO namespace, which will turn it off completely for all operators.

Credit: youtube.com, OpenShift Developer Console

You can also edit the console.operator.openshift.io resource to disable the web console.

To do this, edit the console.operator.openshift.io resource using the command `oc edit console.operator.openshift.io cluster`.

Set the managementState parameter value to Removed to disable the web console.

The other valid values for this parameter are Managed, which enables the console under the cluster's control, and Unmanaged, which means that you are taking control of web console management.

For another approach, see: Disable Swap on Openshift Node

Shut Down CVO and Default Operator

If you're testing your own console operator, you shouldn't have the default one running. To prevent this, you can simply delete the CVO namespace, which will turn it off completely for all operators.

The default console operator will still run if you don't take any action. You can prevent this by shutting down the CVO.

Disable

To disable the OpenShift web console, you can edit the console.operator.openshift.io resource. This is a straightforward process that requires making a single change to the managementState parameter.

Assorted Medicines in Clear Plastic Container
Credit: pexels.com, Assorted Medicines in Clear Plastic Container

You'll need to use the oc edit command to edit the console.operator.openshift.io resource. This will allow you to modify the parameters associated with the resource.

The managementState parameter has three valid values: Removed, Managed, and Unmanaged. To disable the web console, you'll need to set the managementState parameter value to Removed.

Here are the valid values for the managementState parameter:

By setting the managementState parameter value to Removed, you can effectively disable the OpenShift web console.

Operator Management

The OpenShift console provides a centralized platform for managing operators. This includes managing operator lifecycle events, such as install, update, and uninstall.

Operators are self-contained pieces of software that automate the deployment, scaling, and management of applications and services. They can be easily installed and managed through the OpenShift console.

The console allows administrators to view and manage all installed operators, including their status and any associated resources. This provides a clear overview of the operator landscape and enables proactive management.

Related reading: Openshift Operator

Operator

Credit: youtube.com, Ask an OpenShift Admin (Ep 41): Operator Lifecycle Manager Deep Dive

The console-operator is responsible for installing and maintaining the web console on a cluster. It's a crucial component that ensures the web console is up and running.

An operator for OpenShift Console, the console-operator is a specific type of operator designed to manage the web console.

The console-operator can be shut down by disabling the default console-operator, which is a good practice when testing custom operators.

You can also delete the CVO namespace to completely turn off the default console-operator for all operators.

Quick Operator Deployment Prep

You can skip the manual make step by building the container image and pushing it to your own registry.

The Dockerfile includes the make step, so you can simply build the container image and push it to your own registry.

You can build a specific version of the image if needed.

Then, push your image to the registry.

To deploy your new container, duplicate the manifests/07-operator.yaml file and update the image line to use the image you just pushed.

Update the image and replicas in your 07-operator-alt-image.yaml file to reflect the new image.

Make sure the imagePullPolicy is still Always to ensure a fast development feedback loop.

Navigating the Console

Credit: youtube.com, Ask an OpenShift Expert | Ep 158 | What's New with OpenShift Console in 4.19

Navigating the Console is a breeze once you know where to look. The OpenShift web console is divided into several sections, and understanding how to navigate them is key to troubleshooting and managing your applications.

To examine the state of an application, start by navigating to the Pods section in the left pane of the web console. From there, identify the pod running your application and confirm its current state based on the "Status" column.

Hovering over the Application link and selecting Pods will take you to the Pods page. Clicking on the name of the Pod will reveal more details, including the option to view log output, metrics, environment variables, and events.

To examine the log output from your application, click the Logs link along the top of the middle pane. For performance issues, click the Metrics link to examine CPU, memory, or network usage.

If your application is dependent on environment variables, click on the Environment link to confirm their values. To see if your application has been consistently healthy or has been crashing, failing to start, or exhibiting unhealthy behavior, click on the Events link to see health problems detected by OpenShift.

A unique perspective: Console Log in Nextjs

Credit: youtube.com, OpenShift 3.11 Cluster Console Demo - RoleBindings

Additional details about the deployment of the container can be found under the Details link. You can also gain more in-depth exploration from within the container by clicking the Terminal link, which will open an interactive shell running within the live container that runs the application.

Here's a quick rundown of the key sections to navigate:

  • Pods: Examine the state of your application and view log output, metrics, environment variables, and events.
  • Services: Examine the Service definitions and states to troubleshoot connectivity issues.
  • Routes: Examine the Route definitions and states to troubleshoot connectivity issues.
  • Details: View additional information about the deployment of the container.
  • Terminal: Gain in-depth exploration from within the container.

By understanding how to navigate these sections, you'll be well on your way to troubleshooting and managing your applications in OpenShift.

Security and Access

To access the OpenShift web console, you'll need to enable JavaScript in your web browser, as it's a requirement for using the web console. For the best experience, use a web browser that supports WebSockets.

Reviewing the OpenShift 4.x Tested Integrations page before creating the supporting infrastructure for your cluster is also essential. This ensures that your cluster is properly set up for the web console.

The web console runs as a pod on the master, serving the static assets required to run it. Once OpenShift is successfully installed, you can find the URL for the web console and login credentials in the CLI output of the installer.

To log in and access the web console, use the details you found in the CLI output.

For more insights, see: Jenkins Console Output

Troubleshooting

Credit: youtube.com, Display problems in Openshift origin console

If you're experiencing issues with the OpenShift console, start by checking the console's logs for any error messages.

The console's logs can be accessed by clicking on the "Logs" tab in the console's navigation menu.

A common issue is the inability to connect to the console, which can be caused by a misconfigured proxy server.

To resolve this issue, ensure that the proxy server is properly configured and that the console's URL is not blocked by the proxy server.

If you're unable to access the console, try restarting the console's server.

This can often resolve issues related to the console's connection to the underlying Kubernetes cluster.

For another approach, see: Deploy Nfs Server on Openshift

Ismael Anderson

Lead Writer

Ismael Anderson is a seasoned writer with a passion for crafting informative and engaging content. With a focus on technical topics, he has established himself as a reliable source for readers seeking in-depth knowledge on complex subjects. His writing portfolio showcases a range of expertise, including articles on cloud computing and storage solutions, such as AWS S3.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.