Red Hat Openshift Local-2.24-Getting Started Guide-En-Us
Red Hat Openshift Local-2.24-Getting Started Guide-En-Us
24
Quick-start guide to using and developing with Red Hat OpenShift Local
Fabrice Flore-Thebault
ffloreth@redhat.com
Legal Notice
Copyright © 2023 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons
Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is
available at
http://creativecommons.org/licenses/by-sa/3.0/
. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must
provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert,
Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift,
Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States
and other countries.
Linux ® is the registered trademark of Linus Torvalds in the United States and other countries.
XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States
and/or other countries.
MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and
other countries.
Node.js ® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the
official Joyent Node.js open source or commercial project.
The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks
or trademarks/service marks of the OpenStack Foundation, in the United States and other
countries and are used with the OpenStack Foundation's permission. We are not affiliated with,
endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
Abstract
This guide shows how to get up to speed using Red Hat OpenShift Local. Included instructions and
examples guide through first steps developing containerized applications using Red Hat OpenShift
Container Platform 4 from a host workstation (Microsoft Windows, macOS, or Red Hat Enterprise
Linux).
Table of Contents
Table of Contents
. . . . . . . . . .OPEN
MAKING . . . . . . SOURCE
. . . . . . . . . .MORE
. . . . . . .INCLUSIVE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . . . . .
.CHAPTER
. . . . . . . . . . 1.. .INTRODUCING
. . . . . . . . . . . . . . . .RED
. . . . .HAT
. . . . .OPENSHIFT
. . . . . . . . . . . . LOCAL
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5. . . . . . . . . . . . .
1.1. ABOUT RED HAT OPENSHIFT LOCAL 5
1.2. DIFFERENCES FROM A PRODUCTION OPENSHIFT CONTAINER PLATFORM INSTALLATION 5
.CHAPTER
. . . . . . . . . . 2.
. . INSTALLING
. . . . . . . . . . . . . .RED
. . . . .HAT
. . . . .OPENSHIFT
. . . . . . . . . . . . .LOCAL
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6. . . . . . . . . . . . .
2.1. MINIMUM SYSTEM REQUIREMENTS 6
2.1.1. Hardware requirements 6
2.1.1.1. For OpenShift Container Platform 6
2.1.1.2. For MicroShift 6
2.1.1.3. For the Podman container runtime 6
2.1.2. Operating system requirements 7
2.1.2.1. Requirements on Microsoft Windows 7
2.1.2.2. Requirements on macOS 7
2.1.2.3. Requirements on Linux 7
2.2. REQUIRED SOFTWARE PACKAGES FOR LINUX 7
2.3. INSTALLING RED HAT OPENSHIFT LOCAL 7
2.4. ABOUT USAGE DATA COLLECTION 8
2.5. CONFIGURING USAGE DATA COLLECTION 8
2.6. UPGRADING RED HAT OPENSHIFT LOCAL 9
.CHAPTER
. . . . . . . . . . 3.
. . USING
. . . . . . . .RED
. . . . .HAT
. . . . .OPENSHIFT
. . . . . . . . . . . . LOCAL
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11. . . . . . . . . . . . .
3.1. ABOUT PRESETS 11
3.2. SETTING UP RED HAT OPENSHIFT LOCAL 11
3.3. STARTING THE INSTANCE 12
3.4. ACCESSING THE OPENSHIFT CLUSTER 13
3.4.1. Accessing the OpenShift web console 13
3.4.2. Accessing the OpenShift cluster with the OpenShift CLI 14
3.4.3. Accessing the internal OpenShift registry 14
3.5. DEPLOYING A SAMPLE APPLICATION WITH ODO 16
3.6. STOPPING THE INSTANCE 17
3.7. DELETING THE INSTANCE 17
.CHAPTER
. . . . . . . . . . 4.
. . .CONFIGURING
. . . . . . . . . . . . . . . .RED
. . . . HAT
. . . . . OPENSHIFT
. . . . . . . . . . . . . LOCAL
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
..............
4.1. ABOUT RED HAT OPENSHIFT LOCAL CONFIGURATION 18
4.2. VIEWING RED HAT OPENSHIFT LOCAL CONFIGURATION 18
4.3. CHANGING THE SELECTED PRESET 18
4.4. CONFIGURING THE INSTANCE 19
.CHAPTER
. . . . . . . . . . 5.
. . NETWORKING
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
..............
5.1. DNS CONFIGURATION DETAILS 21
5.1.1. General DNS setup 21
5.1.2. DNS on Linux 21
5.1.2.1. NetworkManager + systemd-resolved 21
5.1.2.2. NetworkManager + dnsmasq 21
5.2. RESERVED IP SUBNETS 22
5.3. STARTING RED HAT OPENSHIFT LOCAL BEHIND A PROXY 22
5.4. SETTING UP RED HAT OPENSHIFT LOCAL ON A REMOTE SERVER 23
5.5. CONNECTING TO A REMOTE RED HAT OPENSHIFT LOCAL INSTANCE 24
.CHAPTER
. . . . . . . . . . 6.
. . .ADMINISTRATIVE
. . . . . . . . . . . . . . . . . . TASKS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
..............
6.1. STARTING MONITORING 27
1
Red Hat OpenShift Local 2.24 Getting Started Guide
.CHAPTER
. . . . . . . . . . 7.
. . TROUBLESHOOTING
. . . . . . . . . . . . . . . . . . . . . . .RED
. . . . .HAT
. . . . .OPENSHIFT
. . . . . . . . . . . . .LOCAL
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
..............
7.1. GETTING SHELL ACCESS TO THE OPENSHIFT CLUSTER 29
7.2. TROUBLESHOOTING EXPIRED CERTIFICATES 29
7.3. TROUBLESHOOTING BUNDLE VERSION MISMATCH 30
7.4. TROUBLESHOOTING UNKNOWN ISSUES 30
2
Table of Contents
3
Red Hat OpenShift Local 2.24 Getting Started Guide
4
CHAPTER 1. INTRODUCING RED HAT OPENSHIFT LOCAL
See the OpenShift Container Platform documentation for a full introduction to OpenShift Container
Platform.
Red Hat OpenShift Local includes the crc command-line interface (CLI) to interact with the Red Hat
OpenShift Local instance using the desired container runtime.
The OpenShift Container Platform cluster is ephemeral and is not intended for production
use.
Red Hat OpenShift Local does not have a supported upgrade path to newer OpenShift
Container Platform versions. Upgrading the OpenShift Container Platform version might
cause issues that are difficult to reproduce.
It uses a single node, which behaves as both a control plane and worker node.
It disables the Cluster Monitoring Operator by default. This disabled Operator causes the
corresponding part of the web console to be non-functional.
The OpenShift Container Platform cluster runs in a virtual machine known as an instance. This
might cause other differences, particularly with external networking.
The OpenShift Container Platform cluster provided by Red Hat OpenShift Local also includes the
following non-customizable cluster settings. These settings should not be modified:
The cluster uses the 172 address range. This can cause issues when, for example, a proxy is
run in the same address space.
5
Red Hat OpenShift Local 2.24 Getting Started Guide
Depending on the desired container runtime, Red Hat OpenShift Local requires the following system
resources:
9 GB of free memory
35 GB of storage space
4 GB of free memory
35 GB of storage space
NOTE
The OpenShift Container Platform and MicroShift presets require these minimum
resources to run in the Red Hat OpenShift Local instance. Some workloads might require
more resources. To assign more resources to the Red Hat OpenShift Local instance, see
Configuring the instance.
6
CHAPTER 2. INSTALLING RED HAT OPENSHIFT LOCAL
2 GB of free memory
35 GB of storage space
On Microsoft Windows, Red Hat OpenShift Local requires the Windows 10 Fall Creators Update
(version 1709) or later. Red Hat OpenShift Local does not work on earlier versions of Microsoft
Windows. Microsoft Windows 10 Home Edition is not supported.
On macOS, Red Hat OpenShift Local requires macOS 11 Big Sur or later. Red Hat OpenShift
Local does not work on earlier versions of macOS.
On Linux, Red Hat OpenShift Local is supported only on the latest two Red Hat
Enterprise Linux/CentOS 8 and 9 minor releases and on the latest two stable Fedora releases.
When using Red Hat Enterprise Linux, the machine running Red Hat OpenShift Local must be
registered with the Red Hat Customer Portal .
Ubuntu 18.04 LTS or later and Debian 10 or later are not supported and might require manual
set up of the host machine.
See Required software packages to install the required packages for your Linux distribution.
7
Red Hat OpenShift Local 2.24 Getting Started Guide
Prerequisites
Your host machine must meet the minimum system requirements. For more information, see
Minimum system requirements.
Procedure
1. Download the latest release of Red Hat OpenShift Local for your platform.
3. On macOS or Microsoft Windows, run the guided installer and follow the instructions.
NOTE
On Microsoft Windows, you must install Red Hat OpenShift Local to your local
C:\ drive. You cannot run Red Hat OpenShift Local from a network drive.
On Red Hat Enterprise Linux, assuming the archive is in the ~/Downloads directory, follow
these steps:
$ cd ~/Downloads
$ tar xvf crc-linux-amd64.tar.xz
b. Create the ~/bin directory if it does not exist and copy the crc executable to it:
$ mkdir -p ~/bin
$ cp ~/Downloads/crc-linux-*-amd64/crc ~/bin
$ export PATH=$PATH:$HOME/bin
$ echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
Additional resources
For more information about collected data, see the Red Hat Telemetry data collection notice .
To grant or revoke consent for usage data collection, see Configuring usage data collection .
NOTE
8
CHAPTER 2. INSTALLING RED HAT OPENSHIFT LOCAL
NOTE
Changes to telemetry consent do not modify a running instance. The change will take
effect next time you run the crc start command.
Procedure
Additional resources
For more information about the collected data, see the Red Hat Telemetry data collection
notice.
Procedure
$ crc delete
WARNING
The crc delete command results in the loss of data stored in the Red Hat
OpenShift Local instance. Save any desired information stored in the
instance before running this command.
3. Replace the earlier crc executable with the executable of the latest release. Verify that the new
crc executable is in use by checking its version:
$ crc version
$ crc setup
9
Red Hat OpenShift Local 2.24 Getting Started Guide
$ crc start
10
CHAPTER 3. USING RED HAT OPENSHIFT LOCAL
openshift
A minimal, preconfigured OpenShift Container Platform 4.13 cluster.
microshift
MicroShift.
podman
Podman container runtime.
On Microsoft Windows and macOS, the Red Hat OpenShift Local guided installer prompts you for your
desired preset. On Linux, the OpenShift Container Platform preset is selected by default. You can
change this selection using the crc config command before running the crc setup command. You can
change your selected preset from the system tray on Microsoft Windows and macOS or from the
command line on all supported operating systems. Only one preset can be active at a time.
Additional resources
For more information about the minimum system requirements for each preset, see Minimum
system requirements.
For more information on changing the selected preset, see Changing the selected preset .
The crc setup command creates the ~/.crc directory if it does not already exist.
WARNING
If you are setting up a new version, capture any changes made to the instance
before setting up a new Red Hat OpenShift Local release.
Prerequisites
On Linux or macOS, ensure that your user account has permission to use the sudo command.
On Microsoft Windows, ensure that your user account can elevate to Administrator privileges.
NOTE
11
Red Hat OpenShift Local 2.24 Getting Started Guide
NOTE
Do not run the crc executable as the root user or an administrator. Always run the crc
executable with your user account.
Procedure
1. (Optional) On Linux, the OpenShift Container Platform preset is selected by default. To select
the Podman container runtime preset:
$ crc setup
Additional resources
For more information about the available container runtime presets, see About presets.
Prerequisites
To avoid networking-related issues, ensure that you are not connected to a VPN and that your
network connection is reliable.
You set up the host machine using the crc setup command. For more information, see Setting
up Red Hat OpenShift Local.
On Microsoft Windows, ensure that your user account can elevate to Administrator privileges.
For the OpenShift preset, ensure that you have a valid OpenShift user pull secret. Copy or
download the pull secret from the Pull Secret section of the Red Hat OpenShift Local page on
the Red Hat Hybrid Cloud Console.
NOTE
Procedure
$ crc start
2. For the OpenShift preset, supply your user pull secret when prompted.
NOTE
12
CHAPTER 3. USING RED HAT OPENSHIFT LOCAL
NOTE
The cluster takes a minimum of four minutes to start the necessary containers
and Operators before serving a request.
Additional resources
To change the default resources allocated to the instance, see Configuring the instance.
If you see errors during crc start, see the Troubleshooting Red Hat OpenShift Local section for
potential solutions.
Access the cluster by using either the kubeadmin or developer user. Use the developer user for
creating projects or OpenShift applications and for application deployment. Use the kubeadmin user
only for administrative tasks such as creating new users or setting roles.
Prerequisites
Red Hat OpenShift Local is configured to use the OpenShift preset. For more information, see
Changing the selected preset .
A running Red Hat OpenShift Local instance. For more information, see Starting the instance.
Procedure
1. To access the OpenShift Container Platform web console with your default web browser, run
the following command:
$ crc console
2. Log in as the developer user with the password printed in the output of the crc start command.
You can also view the password for the developer and kubeadmin users by running the
following command:
See Troubleshooting Red Hat OpenShift Local if you cannot access the OpenShift Container Platform
cluster managed by Red Hat OpenShift Local.
Additional resources
The OpenShift Container Platform documentation covers the creation of projects and
applications.
13
Red Hat OpenShift Local 2.24 Getting Started Guide
Prerequisites
Red Hat OpenShift Local is configured to use the OpenShift preset. For more information, see
Changing the selected preset .
A running Red Hat OpenShift Local instance. For more information, see Starting the instance.
Procedure
1. Run the crc oc-env command to print the command needed to add the cached oc executable
to your $PATH:
$ crc oc-env
NOTE
The crc start command prints the password for the developer user. You can also
view it by running the crc console --credentials command.
4. You can now use oc to interact with your OpenShift Container Platform cluster. For example, to
verify that the OpenShift Container Platform cluster Operators are available, log in as the
kubeadmin user and run the following command:
NOTE
Red Hat OpenShift Local disables the Cluster Monitoring Operator by default.
See Troubleshooting Red Hat OpenShift Local if you cannot access the OpenShift Container Platform
cluster managed by Red Hat OpenShift Local.
Additional resources
The OpenShift Container Platform documentation covers the creation of projects and
applications.
14
CHAPTER 3. USING RED HAT OPENSHIFT LOCAL
The OpenShift Container Platform cluster running in the Red Hat OpenShift Local instance includes an
internal container image registry by default. This internal container image registry can be used as a
publication target for locally developed container images. To access the internal OpenShift Container
Platform registry, follow these steps.
Prerequisites
Red Hat OpenShift Local is configured to use the OpenShift preset. For more information, see
Changing the selected preset .
A running Red Hat OpenShift Local instance. For more information, see Starting the instance.
A working OpenShift CLI (oc) command. For more information, see Accessing the OpenShift
cluster with the OpenShift CLI.
Procedure
$ oc whoami
NOTE
$ oc new-project demo
$ oc get is
This setting allows the imagestream to be the source of images without having to provide the
full URL to the internal registry.
15
Red Hat OpenShift Local 2.24 Getting Started Guide
Prerequisites
You have installed odo. For more information, see Installing odo in the odo documentation.
Red Hat OpenShift Local is configured to use the OpenShift preset. For more information, see
Changing the selected preset .
The Red Hat OpenShift Local instance is running. For more information, see Starting the
instance.
Procedure
1. Log in to the running OpenShift Container Platform cluster managed by Red Hat OpenShift
Local as the developer user:
$ mkdir sample-app
$ cd sample-app
$ odo push
8. List the URLs and check the desired URL for the component:
16
CHAPTER 3. USING RED HAT OPENSHIFT LOCAL
Additional resources
For more information about using odo, see the odo documentation.
Procedure
Stop the Red Hat OpenShift Local instance and container runtime:
$ crc stop
Procedure
$ crc delete
WARNING
The crc delete command results in the loss of data stored in the Red Hat
OpenShift Local instance. Save any desired information stored in the
instance before running this command.
17
Red Hat OpenShift Local 2.24 Getting Started Guide
You can also use the crc config command to configure the behavior of the startup checks for the crc
start and crc setup commands. By default, startup checks report an error and stop execution when their
conditions are not met. Set the value of a property starting with skip-check to true to skip the check.
Procedure
NOTE
The crc config view command does not return any information if the
configuration consists of default values.
On Microsoft Windows and macOS, you can change the selected preset using the system tray or
command line interface. On Linux, use the command line interface.
IMPORTANT
You cannot change the preset of an existing Red Hat OpenShift Local instance. Preset
changes are only applied when a Red Hat OpenShift Local instance is created. To enable
preset changes, you must delete the existing instance and start a new one.
18
CHAPTER 4. CONFIGURING RED HAT OPENSHIFT LOCAL
Procedure
Name Preset
microshift MicroShift
Additional resources
For more information about the minimum system requirements for each preset, see Minimum
system requirements.
Alternatively, the number of vCPUs and amount of memory can be assigned using the --cpus and --
memory flags to the crc start command, respectively.
IMPORTANT
You cannot change the configuration of a running Red Hat OpenShift Local instance. To
enable configuration changes, you must stop the running instance and start it again.
Procedure
The default value for the cpus property is 4. The number of vCPUs to assign must be greater
than or equal to the default.
19
Red Hat OpenShift Local 2.24 Getting Started Guide
NOTE
Values for available memory are set in mebibytes (MiB). One gibibyte (GiB) of
memory is equal to 1024 MiB.
The default value for the memory property is 9216. The amount of memory to assign must be
greater than or equal to the default.
20
CHAPTER 5. NETWORKING
CHAPTER 5. NETWORKING
For example, the OpenShift Container Platform API server is exposed as api.crc.testing while the
OpenShift Container Platform console is accessed as console-openshift-console.apps-crc.testing.
These DNS domains are served by a dnsmasq DNS container running inside the Red Hat OpenShift
Local instance.
The crc setup command detects and adjusts your system DNS configuration so that it can resolve these
domains. Additional checks are done to verify DNS is properly configured when running crc start.
This configuration is used by default on Fedora 33 or newer, and on Ubuntu Desktop editions.
Red Hat OpenShift Local configures systemd-resolved to forward requests for the testing
domain to the 192.168.130.11 DNS server. 192.168.130.11 is the IP of the Red Hat OpenShift
Local instance.
#!/bin/sh
export LC_ALL=C
exit 0
NOTE
This configuration is used by default on Fedora 32 or older, on Red Hat Enterprise Linux, and on
21
Red Hat OpenShift Local 2.24 Getting Started Guide
This configuration is used by default on Fedora 32 or older, on Red Hat Enterprise Linux, and on
CentOS.
server=/crc.testing/192.168.130.11
server=/apps-crc.testing/192.168.130.11
The NetworkManager dnsmasq instance forwards requests for the crc.testing and apps-
crc.testing domains to the 192.168.130.11 DNS server.
Reserved IP subnets
10.217.0.0/22
10.217.4.0/23
192.168.126.0/24
Additionally, the host hypervisor might reserve another IP subnet depending on the host operating
system. No additional subnet is reserved on macOS and Microsoft Windows. The additional reserved
subnet for Linux is 192.168.130.0/24.
NOTE
Prerequisites
If you are not using crc oc-env, when interacting with the cluster, export the .testing domain as
part of the no_proxy environment variable. The embedded oc executable does not require
manual settings. For more information about using the embedded oc executable, see Accessing
the OpenShift cluster with the OpenShift CLI.
Procedure
1. Define a proxy using the http_proxy and https_proxy environment variables or using the crc
config set command as follows:
22
CHAPTER 5. NETWORKING
NOTE
Proxy-related values set in the configuration for Red Hat OpenShift Local have priority
over values set with environment variables.
This procedure assumes the use of a Red Hat Enterprise Linux, Fedora, or CentOS server. Run every
command in this procedure on the remote server.
WARNING
Prerequisites
Red Hat OpenShift Local is installed and set up on the remote server. For more information, see
Installing Red Hat OpenShift Local and Setting up Red Hat OpenShift Local.
Red Hat OpenShift Local is configured to use the OpenShift preset on the remote server. For
more information, see Changing the selected preset .
Procedure
$ crc start
23
Red Hat OpenShift Local 2.24 Getting Started Guide
4. For SELinux, allow HAProxy to listen on TCP port 6443 to serve kube-apiserver on this port:
$ sudo cp /etc/haproxy/haproxy.cfg{,.bak}
defaults
balance roundrobin
log global
maxconn 100
mode tcp
timeout connect 5s
timeout client 500s
timeout server 500s
listen apps
bind 0.0.0.0:80
server crcvm $CRC_IP:80 check
listen apps_ssl
bind 0.0.0.0:443
server crcvm $CRC_IP:443 check
listen api
bind 0.0.0.0:6443
server crcvm $CRC_IP:6443 check
EOF
Use dnsmasq to connect a client machine to a remote server running an OpenShift Container Platform
24
CHAPTER 5. NETWORKING
Use dnsmasq to connect a client machine to a remote server running an OpenShift Container Platform
cluster managed by Red Hat OpenShift Local.
This procedure assumes the use of a Red Hat Enterprise Linux, Fedora, or CentOS client. Run every
command in this procedure on the client.
IMPORTANT
Prerequisites
A remote server is set up for the client to connect to. For more information, see Setting up
Red Hat OpenShift Local on a remote server.
You have the latest OpenShift CLI (oc) in your $PATH on the client.
Procedure
3. Add DNS entries for Red Hat OpenShift Local to the dnsmasq configuration:
NOTE
25
Red Hat OpenShift Local 2.24 Getting Started Guide
26
CHAPTER 6. ADMINISTRATIVE TASKS
Prerequisites
You must assign additional memory to the Red Hat OpenShift Local instance. At least 14 GiB of
memory, a value of 14336, is recommended for core functionality. Increased workloads will
require more memory. For more information, see Configuring the instance.
Procedure
$ crc start
WARNING
Prerequisites
A running Red Hat OpenShift Local virtual machine and a working oc command. For more
information, see Accessing the OpenShift cluster with oc.
Procedure
1. List unmanaged Operators and note the numeric index for the desired Operator:
On Linux or macOS:
27
Red Hat OpenShift Local 2.24 Getting Started Guide
28
CHAPTER 7. TROUBLESHOOTING RED HAT OPENSHIFT LOCAL
NOTE
The goal of Red Hat OpenShift Local is to deliver an OpenShift Container Platform
environment for development and testing purposes. Issues occurring during installation
or usage of specific OpenShift applications are outside of the scope of Red Hat
OpenShift Local. Report such issues to the relevant project.
NOTE
Direct access to the OpenShift Container Platform cluster is not needed for regular use
and is strongly discouraged.
Prerequisites
Enable OpenShift CLI (oc) access to the cluster and log in as the kubeadmin user. For detailed
steps, see Accessing the OpenShift cluster with the OpenShift CLI.
Procedure
1. Run the oc get nodes command to identify the desired node. The output will be similar to this:
$ oc get nodes
NAME STATUS ROLES AGE VERSION
crc-shdl4-master-0 Ready master,worker 7d7h v1.14.6+7e13ab9a7
2. Run oc debug nodes/<node> where <node> is the name of the node printed in the previous
step.
To avoid this additional startup time, or in case of failures in the certificate renewal process, use the
following procedure:
Procedure
To resolve expired certificate errors that cannot be automatically renewed:
1. Download the latest Red Hat OpenShift Local release and place the crc executable in your
$PATH.
2. Remove the cluster with certificate errors using the crc delete command:
29
Red Hat OpenShift Local 2.24 Getting Started Guide
$ crc delete
WARNING
The crc delete command results in the loss of data stored in the Red Hat
OpenShift Local instance. Save any desired information stored in the
instance before running this command.
$ crc setup
$ crc start
$ crc start
...
FATA Bundle 'crc_hyperkit_4.2.8.crcbundle' was requested, but the existing VM is using
'crc_hyperkit_4.2.2.crcbundle'
Procedure
1. Issue the crc delete command before attempting to start the instance:
$ crc delete
WARNING
The crc delete command results in the loss of data stored in the Red Hat
OpenShift Local instance. Save any desired information stored in the
instance before running this command.
30
CHAPTER 7. TROUBLESHOOTING RED HAT OPENSHIFT LOCAL
Resolve most issues by restarting Red Hat OpenShift Local with a clean state. This involves stopping the
instance, deleting it, reverting changes made by the crc setup command, reapplying those changes, and
restarting the instance.
Prerequisites
You set up the host machine with the crc setup command. For more information, see Setting
up Red Hat OpenShift Local.
You started Red Hat OpenShift Local with the crc start command. For more information, see
Starting the instance.
You are using the latest Red Hat OpenShift Local release. Using a version earlier than Red Hat
OpenShift Local 1.2.0 might result in errors related to expired x509 certificates. For more
information, see Troubleshooting expired certificates.
Procedure
To troubleshoot Red Hat OpenShift Local, perform the following steps:
$ crc stop
$ crc delete
WARNING
The crc delete command results in the loss of data stored in the Red Hat
OpenShift Local instance. Save any desired information stored in the
instance before running this command.
$ crc cleanup
NOTE
The crc cleanup command removes an existing Red Hat OpenShift Local
instance and reverts changes to DNS entries created by the crc setup command.
On macOS, the crc cleanup command also removes the system tray.
$ crc setup
31
Red Hat OpenShift Local 2.24 Getting Started Guide
$ crc start
NOTE
The cluster takes a minimum of four minutes to start the necessary containers
and Operators before serving a request.
If your issue is not resolved by this procedure, perform the following steps:
1. Search open issues for the issue that you are encountering.
2. If no existing issue addresses the encountered issue, create an issue and attach the
~/.crc/crc.log file to the created issue. The ~/.crc/crc.log file has detailed debugging and
troubleshooting information which can help diagnose the problem that you are experiencing.
32