Install OpenShift Cluster 4.6 with CodeReady Containers on your local machine MacOS
CodeReady is workspace uses kubernates and containers, any user can easily deploy OpenShift cluster with CodeReady containers environment. Easy to setup with zero configurations, faster time to development.
I found this very helpful, tracking your progress, practicing on the local >>> anytime, offline, not countable hours especially if you’re a member with Red Hat subscription, deploy openshift cluster on a single configuration worker node for free, practice as much as you like with full access to openshift cluster, you can perform tasks as kubeadmin including full access to web-console.
I am really impressed with CodeReady Containers. You gain the full OpenShift 4 experience with the new web console and the Operator Hub catalog to get started with Operators.
In this tutorial, it will takes 30 mins to set up your openshift cluster 4.6 on your local MacOS.
Step 1: Install Mac packaging tool Homebrew , once finished install and download iTerm 2.
First, if you don’t have Homebrew already, let’s download and install it.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then let’s use Homebrew to download and install iTerm 2:
brew cask install iterm2
Step 3: Download CodeReady Container latest version.
If you don’t already have a Red Hat login, then please register. https://cloud.redhat.com/openshift/install/crc/installer-provisioned
- 4 virtual CPUs (vCPUs)
- 9 GB of free memory
- 35 GB of storage space
CodeReady container is set to 9GB. Therefore; I would suggest you to boots your VM memory allocated set to 13GB or maybe 12GB. So, codeready container runs more efficiently.
Copy the crc file into directory.
echo $PATH >>> list Directories
cp crc /usr/local/bin >>> copy the crc file into dir
As a normal user setup codeready. Don’t do it as root.
Set your VM memory to 13GB, so codeready container runs more smoothly.
step . crc config set memory 12288
Start codeready container.
step . crc start
Copy and paste secret file and hit enter.
step . copy & paste secret file and hit enter
Enable oc client CLI tools, and add oc executable to your PATH .
step . eval $(crc oc-env)
Display the credentials to login with crc.
step . crc console --credentials
After login, access to console if you would like.
oc whoami >>> kube:admin
step . oc whoami --show-console
You did it, Enjoy!!! Now you can login as Kubeadmin, and have full access to openshift cluster including access to web-console.
If you are running windows, I would suggest you to install codeready container with Fedora, it’s easy and less troubleshooting, download ios image then, setup your USB Drive with rufus , make sure to setup partition space in your disk management. then simply reboot your system and install live Fedora workstation. make sure the cpu & virtualization is enabled in your BOIS and kvm works properly.
One process is important before you start Installing the codeready, you need to install NetworkManager package.
As root user.
root@ sudo dnf install NetworkManager
Finally, As I mentioned above, redo the process as a normal user.
For Linux, follow the tutorial below I am running Fedora 34.