Skip to content

OpenShift Local

Assuming you have a Red Hat developer account, head to https://console.redhat.com/openshift/create/local and download crc.

Extract the archive:

tar xvf crc-linux-amd64.tar.xz

Ensure you have a binary path in your home directory:

mkdir -p ~/local/bin

Move the crc binary:

mv crc-linux-*-amd64/crc ~/local/bin/
Export the new PATH:

export PATH=$HOME/local/bin:$PATH

Check that crc is now in your PATH and working:

crc version

Example output:

CRC version: 2.16.0+05b62a75
OpenShift version: 4.12.9
Podman version: 4.4.1

Ensure you PATH is persistent to survive reboots:

echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc

Run the setup:

crc setup

Configure resource for OpenSHift Local:

crc config set cpus 8
crc config set memory 16384
crc config view

Start OpenShift Local:

crc start -p ~/openshift/pull-secret.txt

If successful you should now have access to a local development OpenShift:

https://console-openshift-console.apps-crc.testing

The console will provide you with login credentials.

Log into the Web Console and click the question mark icon (top right) and go to Command Line Tools to download the oc command line tool.

tar -xvf oc.tar 
mv oc ~/local/bin/

Expose the image register so the developer user can use it:

oc login -u kubeadmin https://api.crc.testing:6443

Ensure public route enabled:

oc patch config.imageregistry cluster --type merge --patch '{"spec":{"defaultRoute":true}}'

Ensure the developer user has permission:

oc policy add-role-to-user registry-viewer developer
oc policy add-role-to-user registry-editor developer