Cyber Deals - Get up to 65% off on CKA, CKAD, CKS, KCNA, KCSA exams and courses!

OpenShift Local (Formerly CodeReady Containers - CRC)

Red Hat CodeReady Containers

Installing CodeReady Containers

Download CRC Package

Refer : Install OpenShift on a laptop with CodeReady Containers Also check: https://www.openshift.com/try

Required software packages

CodeReady Containers requires the libvirt and NetworkManager packages.

yum install NetworkManager
wget https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz

Enable sudo for user

[devops@node1 ~]$ sudo cat /etc/sudoers.d/devops
[sudo] password for devops:
devops ALL=(ALL) NOPASSWD: ALL

Setup Cluster

$ cd crc-linux-1.11.0-amd64
$ export PATH=/home/devops/crc-linux-1.11.0-amd64:$PATH

## set up your host operating system for the CodeReady Containers virtual machine.
## Use normal user account
$ crc setup

# Configure CRC
crc config set cpus 4
crc config set memory
## Start cluster
## if you are on a terminal without GUI, you will have difficulty to copy/paste pull secret content. in that you can mention the pull secret ful
$ crc start -p /path-to/pull-secret

Access your Cluster

$ eval $(crc oc-env)
$ oc login -u developer -p developer

## see credentials
$ crc console --credentials
To login as a regular user, run 'oc login -u developer -p developer https://api.crc.testing:6443'.
To login as an admin, run 'oc login -u kubeadmin -p 8rynV-SeYLc-h8Ij7-YPYcz https://api.crc.testing:6443'

## Access Console
$ crc console
Opening the OpenShift Web Console in the default browser...

Enable cluster monitoring (metrics)

CodeReady Containers disables the machine-config and monitoring Operators by default.

To enable:

crc config set enable-cluster-monitoring true

Clean up

$ crc cleanup

Troubleshooting

  • Issue : After crc start and crc console, oc login fails with Internal error occurred: unexpected response: 503 for a while #740

  • Issue : Unable to connect to console

$ crc ip
$ nmcli conn show

Installing CRC on GCP (WIP)

Create a GCP Instance with Nested Virtualization

# create the instance with nested virtualization
# add other parameters as needed
gcloud compute instances create VM_NAME \
  --enable-nested-virtualization \
  --zone=ZONE \
  --min-cpu-platform="Intel Haswell"

# login to VM
gcloud compute ssh VM_NAME

# check nested virtualization
grep -cw vmx /proc/cpuinfo

References:

Disclaimer: Views expressed in articles are those of the respective authors and do not necessarily reflect the views of their employers or this site. While we aim for accuracy, please verify information before relying on it, and let us know if you spot an error.
Share:

Related Posts

Openshift

VirtualBox Notes

1. VirtualBox Guest Addtion on CLI 2. Optimize VirtualBox VM Disk Space 3. Troubleshooing VirtualBox VM 3.1. Unable to mount Shared folders in CLI 1. …

Openshift

OpenShift Installation Methods - Examples

Installing an OKD 4.x Cluster Install OpenShift 4.x Method I - Setup an OpenShift All-In-One Install required packages Disable Firewall Installing …

Openshift

OpenShift Installation Baremetal on AWS

INPG - DO NOT FOLLOW BLINDLY! Other notes: OpenShift - Tools, Learning Guides and References OpenShift and Service Mesh OpenShift Installation Methods …

Openshift

OCP Origin 3.x Installation - on GCP

Master Server Configuration Step 1 : Update system Step 2 : Install Required Packages Step 3 : Clone the package from github Step 4: Configure your …

Openshift

OpenShift Installation on GCP with Nested Vrtualization

Warning: This is NOT tested multiple times; refere by your own risk