OpenShift Local
Notes// archive From the original Code Walker docs. Kept for reference, so some versions and commands may be out of date.
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.xzEnsure you have a binary path in your home directory:
mkdir -p ~/local/binMove the crc binary:
mv crc-linux-*-amd64/crc ~/local/bin/Export the new PATH:
export PATH=$HOME/local/bin:$PATHCheck that crc is now in your PATH and working:
crc versionExample output:
CRC version: 2.16.0+05b62a75
OpenShift version: 4.12.9
Podman version: 4.4.1Ensure you PATH is persistent to survive reboots:
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrcRun the setup:
crc setupConfigure resource for OpenSHift Local:
crc config set cpus 8
crc config set memory 16384
crc config viewStart OpenShift Local:
crc start -p ~/openshift/pull-secret.txtIf 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:6443Ensure 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 developeroc policy add-role-to-user registry-editor developer