What is Red Hat OpenShift Local
- an OpenShift 4 cluster for local development
- minimum 4 vCPU, 8 GB RAM, 35 GB storage
- formerly CodeReady Containers
OpenShift Local is designed for local development and testing on an OpenShift 4 cluster. The OpenShift Local requires at least:
- 4 virtual CPUs (vCPUs)
- 8 GB of RAM memory
- 35 GB of storage space
Playbook
How to Install Red Hat OpenShift Local in MacOS and simple usage.
cluster setup
ansible-pilot $ crc setup
CRC is constantly improving and we would like to know more about usage (more details at https://developers.redhat.com/article/tool-data-collection)
Your preference can be changed manually if desired using 'crc config set consent-telemetry <yes/no>'
Would you like to contribute anonymous usage statistics? [y/N]: y
Thanks for helping us! You can disable telemetry with the command 'crc config set consent-telemetry no'.
INFO Using bundle path /Users/lberton/.crc/cache/crc_vfkit_4.11.3_arm64.crcbundle
INFO Checking if running as non-root
INFO Checking if crc-admin-helper executable is cached
INFO Checking for obsolete admin-helper executable
INFO Checking if running on a supported CPU architecture
INFO Checking minimum RAM requirements
INFO Checking if crc executable symlink exists
INFO Creating symlink for crc executable
INFO Checking if running emulated on a M1 CPU
INFO Checking if vfkit is installed
INFO Checking if CRC bundle is extracted in '$HOME/.crc'
INFO Checking if /Users/lberton/.crc/cache/crc_vfkit_4.11.3_arm64.crcbundle exists
INFO Getting bundle for the CRC executable
3.09 GiB / 3.09 GiB [--------------------------------------------------------------------] 100.00% 2.84 MiB p/s
INFO Uncompressing /Users/lberton/.crc/cache/crc_vfkit_4.11.3_arm64.crcbundle
crc.img: 31.00 GiB / 31.00 GiB [----------------------------------------------------------------------] 100.00%
INFO Checking if old launchd config for tray and/or daemon exists
INFO Checking if crc daemon plist file is present and loaded
INFO Adding crc daemon plist file and loading it
Your system is correctly setup for using CRC. Use 'crc start' to start the instance
ansible-pilot $
cluster start
ansible-pilot $ crc start
INFO Checking if running as non-root
INFO Checking if crc-admin-helper executable is cached
INFO Checking for obsolete admin-helper executable
INFO Checking if running on a supported CPU architecture
INFO Checking minimum RAM requirements
INFO Checking if crc executable symlink exists
INFO Checking if running emulated on a M1 CPU
INFO Checking if vfkit is installed
INFO Checking if old launchd config for tray and/or daemon exists
INFO Checking if crc daemon plist file is present and loaded
INFO Loading bundle: crc_vfkit_4.11.3_arm64...
INFO Starting CRC VM for openshift 4.11.3...
INFO CRC instance is running with IP 127.0.0.1
INFO CRC VM is running
INFO Configuring shared directories
INFO Check internal and public DNS query...
INFO Check DNS query from host...
INFO Verifying validity of the kubelet certificates...
INFO Starting kubelet service
INFO Waiting for kube-apiserver availability... [takes around 2min]
INFO Waiting for user\'s pull secret part of instance disk...
INFO Starting openshift instance... [waiting for the cluster to stabilize]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.
The server is accessible via web console at:
https://console-openshift-console.apps-crc.testing
Log in as administrator:
Username: kubeadmin
Password: zc3Qx-ejEii-KALgK-5pbYU
Log in as user:
Username: developer
Password: developer
Use the 'oc' command line interface:
$ eval $(crc oc-env)
$ oc login -u developer https://api.crc.testing:6443
ansible-pilot $
cluster status
ansible-pilot $ oc status
CRC VM: Running
OpenShift: Degraded (v4.11.3)
Podman:
Disk Usage: 16.39GB of 32.74GB (Inside the CRC VM)
Cache Usage: 36.85GB
ansible-pilot $
cluster WebUI
The server is accessible via web console at: https://console-openshift-console.apps-crc.testing
cluster stop
ansible-pilot $ crc stop
INFO Stopping kubelet and all containers...
INFO Updating kernel args...
INFO Stopping the instance, this may take a few minutes...
Stopped the instance
ansible-pilot $ crc status
CRC VM: Stopped
OpenShift: Stopped (v4.11.3)
Podman:
Disk Usage: 0B of 0B (Inside the CRC VM)
Cache Usage: 36.85GB
Cache Directory: /Users/lberton/.crc/cache
ansible-pilot $
cluster restart
ansible-pilot $ crc stop
INFO Stopping kubelet and all containers...
INFO Updating kernel args...
INFO Stopping the instance, this may take a few minutes...
Stopped the instance
ansible-pilot $ crc status
CRC VM: Stopped
OpenShift: Stopped (v4.11.3)
Podman:
Disk Usage: 0B of 0B (Inside the CRC VM)
Cache Usage: 36.85GB
Cache Directory: /Users/lberton/.crc/cache
ansible-pilot $ crc start
INFO Checking if running as non-root
INFO Checking if crc-admin-helper executable is cached
INFO Checking for obsolete admin-helper executable
INFO Checking if running on a supported CPU architecture
INFO Checking minimum RAM requirements
INFO Checking if crc executable symlink exists
INFO Checking if running emulated on a M1 CPU
INFO Checking if vfkit is installed
INFO Checking if old launchd config for tray and/or daemon exists
INFO Checking if crc daemon plist file is present and loaded
INFO Loading bundle: crc_vfkit_4.11.3_arm64...
INFO Starting CRC VM for openshift 4.11.3...
INFO CRC instance is running with IP 127.0.0.1
INFO CRC VM is running
INFO Configuring shared directories
INFO Check internal and public DNS query...
INFO Check DNS query from host...
INFO Verifying validity of the kubelet certificates...
INFO Starting kubelet service
INFO Waiting for kube-apiserver availability... [takes around 2min]
INFO Waiting for user\'s pull secret part of instance disk...
INFO Starting openshift instance... [waiting for the cluster to stabilize]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.
The server is accessible via web console at:
https://console-openshift-console.apps-crc.testing
Log in as administrator:
Username: kubeadmin
Password: zc3Qx-ejEii-KALgK-5pbYU
Log in as user:
Username: developer
Password: developer
Use the 'oc' command line interface:
$ eval $(crc oc-env)
$ oc login -u developer https://api.crc.testing:6443
ansible-pilot $ crc status
CRC VM: Running
OpenShift: Degraded (v4.11.3)
Podman:
Disk Usage: 16.39GB of 32.74GB (Inside the CRC VM)
Cache Usage: 36.85GB
Cache Directory: /Users/lberton/.crc/cache
Conclusion
Now you know how to install Red Hat OpenShift Local (formerly CodeReady Containers) in macOS and how to manage the OpenShifft 4 cluster, start, stop, restart, and status.
Subscribe to the YouTube channel, Medium, and Website, X (formerly Twitter) to not miss the next episode of the Ansible Pilot.Academy
Learn the Ansible automation technology with some real-life examples in my Udemy 300+ Lessons Video Course.
My book Ansible By Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps
Donate
Want to keep this project going? Please donate