AnsiblePilot — Master Ansible Automation

AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,400 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.

Popular Topics

About Luca Berton

Luca Berton is an Ansible automation expert, author of 8 Ansible books published by Apress and Leanpub including "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example", and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.

Install Red Hat OpenShift Local Kubernetes in macOS on MacBook Pro Intel x86_64 and M1 arm64

By Luca Berton · Published 2024-01-01 · Category: installation

How to install Red Hat OpenShift Local Kubernetes (formerly CodeReady Containers) to run a complete OpenShift 4 cluster in your Mac (Intel Chip x86_64 or Apple.

Install Red Hat OpenShift Local Kubernetes in macOS on MacBook Pro Intel x86_64 and M1 arm64

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. • Red Hat OpenShift 4 on your laptop: Introducing Red Hat CodeReady Containers

Red Hat OpenShift Local website Red Hat OpenShift Local download Red Hat OpenShift Local macOS installer

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

Red Hat CodeReady Containers webui

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

See also: Install Red Hat CodeReady Containers to run OpenShift 4 in macOS

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.

System Requirements

| Requirement | Intel Mac | Apple Silicon Mac | |---|---|---| | CPU | 4 physical cores | 4 performance cores | | RAM | 9 GB free | 9 GB free | | Disk | 35 GB free | 35 GB free | | macOS | 12+ (Monterey) | 12+ (Monterey) |

See also: AAP 2.6 Install Guide: Containerized, RPM & OpenShift Methods (2026)

Quick Start

# Download from https://console.redhat.com/openshift/create/local
# Setup (one-time)
crc setup

# Start the cluster crc start

# Configure CLI tools eval $(crc oc-env)

# Login oc login -u developer -p developer https://api.crc.testing:6443

# Open web console crc console

Managing OpenShift Local with Ansible

Use the kubernetes.core collection to manage resources on your local cluster:

---
- name: Deploy app to OpenShift Local
  hosts: localhost
  connection: local
  collections:
    - kubernetes.core
  tasks:
    - name: Create project
      kubernetes.core.k8s:
        state: present
        definition:
          apiVersion: project.openshift.io/v1
          kind: Project
          metadata:
            name: ansible-demo

- name: Deploy a pod kubernetes.core.k8s: state: present namespace: ansible-demo definition: apiVersion: v1 kind: Pod metadata: name: test-pod spec: containers: - name: ubi image: registry.access.redhat.com/ubi9/ubi-minimal command: ["sleep", "infinity"]

See also: Ansible troubleshooting - Kubernetes K8s or OpenShift OCP 401 Unauthorized

Troubleshooting

| Issue | Solution | |---|---| | crc start fails with memory error | Increase memory: crc config set memory 12288 | | DNS resolution fails | Run crc cleanup then crc setup again | | Cluster won't start after macOS update | Run crc delete then crc start for fresh cluster | | Apple Silicon performance issues | Ensure Rosetta 2 is installed: softwareupdate --install-rosetta |

FAQ

Does OpenShift Local work on M1/M2/M3/M4 Macs?

Yes. OpenShift Local has native Apple Silicon support since version 2.12. Earlier versions required Rosetta 2.

Can I run AWX on OpenShift Local?

Yes for development/testing. AWX requires at least 12 GB RAM allocated to CRC: crc config set memory 12288.

How is OpenShift Local different from Minikube or Kind?

OpenShift Local runs a full OpenShift cluster (including the web console, operators, and routes), while Minikube and Kind run plain Kubernetes.

Is OpenShift Local free?

Yes. You need a free Red Hat account to download it, but no subscription is required.

Category: installation

Watch the video: Install Red Hat OpenShift Local Kubernetes in macOS on MacBook Pro Intel x86_64 and M1 arm64 — Video Tutorial

Browse all Ansible tutorials · AnsiblePilot Home