Setup
Go to https://console.redhat.com/openshift/cluster-list
Select Cluster List and click Create cluster.
Select Local and select MacOS and x86_64 and click the Download OpenShift Local.
Once downloaded, run the package.
Install OC Client
crc oc-env
Setup
crc setup
Config
Configure our cpus and memory.
crc config set cpus 10 crc config get cpus crc config set memory 32000 crc config get memory
For a full list of configuration parameters issue the following command:
crc config
Modifies crc configuration properties. Properties: * bundle Bundle path/URI - absolute or local path, http, https or docker URI (string, like 'https://foo.com/crc_vfkit_4.16.7_arm64.crcbundle', 'docker://quay.io/myorg/crc_vfkit_4.16.7_arm64.crcbundle:2.41.0' default '/Users/john/.crc/cache/crc_vfkit_4.16.7_arm64.crcbundle' ) * consent-telemetry Consent to collection of anonymous usage data (yes/no) * cpus Number of CPU cores (must be greater than or equal to '4') * disable-update-check Disable update check (true/false, default: false) * disk-size Total size in GiB of the disk (must be greater than or equal to '31') * enable-bundle-quay-fallback If bundle download from the default location fails, fallback to quay.io (true/false, default: false) * enable-cluster-monitoring Enable cluster monitoring Operator (true/false, default: false) * enable-emergency-login Enable emergency login for 'core' user. Password is randomly generated. (true/false, default: false) * enable-experimental-features Enable experimental features (true/false, default: false) * enable-shared-dirs Mounts host's home directory at '/' in the CRC VM (true/false, default: true) * host-network-access Allow TCP/IP connections from the CRC VM to services running on the host (true/false, default: false) * http-proxy HTTP proxy URL (string, like 'http://my-proxy.com:8443') * https-proxy HTTPS proxy URL (string, like 'https://my-proxy.com:8443') * ingress-http-port HTTP port to use for OpenShift ingress/routes on the host (1024-65535, default: 80) * ingress-https-port HTTPS port to use for OpenShift ingress/routes on the host (1024-65535, default: 443) * kubeadmin-password User defined kubeadmin password * memory Memory size in MiB (must be greater than or equal to '10752') * nameserver IPv4 address of nameserver (string, like '1.1.1.1 or 8.8.8.8') * no-proxy Hosts, ipv4 addresses or CIDR which do not use a proxy (string, comma-separated list such as '127.0.0.1,192.168.100.1/24') * persistent-volume-size Total size in GiB of the persistent volume used by the CSI driver for microshift preset (must be greater than or equal to '15') * preset Virtual machine preset (valid values are: [openshift okd microshift]) * proxy-ca-file Path to an HTTPS proxy certificate authority (CA) * pull-secret-file Path of image pull secret (download from https://console.redhat.com/openshift/create/local) * skip-check-admin-helper-cached Skip preflight check (true/false, default: false) * skip-check-bundle-extracted Skip preflight check (true/false, default: false) * skip-check-crc-symlink Skip preflight check (true/false, default: false) * skip-check-daemon-launchd-plist Skip preflight check (true/false, default: false) * skip-check-m1-cpu Skip preflight check (true/false, default: false) * skip-check-mac-version Skip preflight check (true/false, default: false) * skip-check-old-autostart Skip preflight check (true/false, default: false) * skip-check-podman-in-ocbindir Skip preflight check (true/false, default: false) * skip-check-ram Skip preflight check (true/false, default: false) * skip-check-resolver-file-permissions Skip preflight check (true/false, default: false) * skip-check-root-user Skip preflight check (true/false, default: false) * skip-check-ssh-port Skip preflight check (true/false, default: false) * skip-check-supported-cpu-arch Skip preflight check (true/false, default: false) * skip-check-vfkit-installed Skip preflight check (true/false, default: false)
Starting the Cluster
Once downloaded and extracted, run:
crc start
Grab the pull secrets form the UI by clicking the Copy pull secret link.
Past the pull secret to the terminal
Login
oc login -u kubeadmin https://api.crc.testing:6443
CRC
CRC is a tool that manages a local OpenShift 4.x cluster optimized for testing and development purposes Usage: crc [flags] crc [command] Available Commands: bundle Manage CRC bundles cleanup Undo config changes completion Generate the autocompletion script for the specified shell config Modify crc configuration console Open the OpenShift Web Console in the default browser delete Delete the instance help Help about any command ip Get IP address of the running OpenShift cluster oc-env Add the 'oc' executable to PATH podman-env Setup podman environment setup Set up prerequisites for using CRC start Start the instance status Display status of the OpenShift cluster stop Stop the instance version Print version information Flags: -h, --help help for crc --log-level string log level (e.g. "debug | info | warn | error") (default "info")
References
Reference | URL |
---|---|
Install Red Hat OpenShift Local Kubernetes in macOS on MacBook Pro Intel x86_64 and M1 arm64 | https://www.youtube.com/watch?v=Qr2Gdc6p00A |