Red Hat OpenShift Local
Investigating OpenShift is much simpler when having access to a cluster. Red Hat OpenShift Local, previously known as CodeReady Containers or CRC, is a self-contained application available for computers running Windows, Mac, and Linux. Developers can download and run OpenShift Local and access various features in a minimalistic environment geared for developers and testers.
OpenShift Local is not prepared for production use, instead using the current workstation as both Control Plane and Worker Node. Among various optimizations, OpenShift Local runs by default with disabled monitoring features, which can be enabled if needed.
Requirements
OpenShift Local requires the following minimum operating system configurations:
-
Windows 10 Fall Creators Update (version 1709) or later.
-
macOS 11 Big Sur or later.
-
Red Hat Enterprise Linux (RHEL), Fedora, or CentOS 8 or later.
These requirements are valid as of the publication of this video, and may change over time. We recommend you to check the official Red Hat OpenShift Local documentation for an updated list of requirements at the official documentation website.
Regarding Linux, even if Red Hat does not officially support them, OpenShift Local can run on other distributions, such as Ubuntu or Debian, with minor caveats. Running OpenShift Local on any Linux distribution requires a few additional software packages to be installed through your default package manager. The documentation at crc.dev/crc has more information about this subject. |
Hardware Requirements
In terms of hardware, OpenShift Local has some strict requirements. Your system must use a recent Intel CPU (except for Macs, where Apple Silicon machines are supported) with at least four physical cores and have at least 16 GB of RAM. Be aware that the base installation of OpenShift Local requires at least 9 GB free to start. Of course, to run other applications on OpenShift Local, you will need more RAM, so using a computer with at least 32 GB of RAM is strongly recommended. OpenShift Local also requires at least 35 GB of free disk space for its installation. The memory requirements are likely to increase in the future, so please check the documentation at crc.dev for more up-to-date information.
Installation
To install OpenShift Local, open your web browser and navigate to console.redhat.com/openshift/create/local . Download the latest release of OpenShift Local and the "pull secret" file. The latter is a file containing a key identifying your copy of OpenShift Local to your Red Hat Developer account.
Unzip the file containing the OpenShift Local executable, and using your terminal, run the command crc setup
. This command will prepare your copy of OpenShift Local, verifying requirements and setting the required configuration values.
Once the crc setup
command is ready, launch crc start
. Running crc start
can take a long time, around 20 minutes, on a recent PC.
Once started, access the OpenShift Web Console with the crc console
command, which will open your default browser. OpenShift Local uses the developer
username and password to log in as a low-privilege user, while the kubeadmin
user uses a random-generated password. Use the crc console --credentials
command to find the credentials required to log in as the kubeadmin
user.
OpenShift Local allows developers to perform various everyday tasks as if it were a standard OpenShift cluster, like deploying applications and configuring and triggering CI/CD pipelines.
OpenShift Local can take a long time to start. For that reason, you can run crc stop
to freeze the cluster in its current state to resume operations later. On the other hand, the command crc delete
completely removes the OpenShift Local cluster from the workstation.
Red Hat OpenShift Local uses two DNS domain names: crc.testing
and apps-crc.testing
. The first provides functionalities required internally by the cluster, while the second exposes OpenShift applications deployed on the cluster to the outside world.
Ubuntu Linux users should modify their /etc/hosts file so that both domain names point to the local IP; this is something RHEL, Fedora, and CentOS users don’t need to do.
|
To enable monitoring on your OpenShift Local instance, you should execute the command crc config set enable-cluster-monitoring true
before running crc setup
.
There is a demo script for the installation of CRC on Linux in the 01_07 branch of the GitHub repository for this course.
|