Install Docker for Mac making sure you meet the prerequisites.
Once Docker is running, add an insecure registry of
172.30.0.0/16:- From the Docker menu in the toolbar, select
Preferences... - Click on
Daemon in the preferences dialog (note: on some older versions of Docker for Mac this is under Advanced) - Under
Insecure registries:, click on the + icon to add a new entry - Enter
172.30.0.0/16 and press return - Click on
Apply and Restart
- From the Docker menu in the toolbar, select
Install
socat- If not already installed, install Homebrew for Mac
- Install socatOpen Terminal and run:
$ brew install socatInstall the oc binary using homebrew with:
brew install openshift-cliOR
Download the Mac OS
oc binary from openshift-origin-client-tools-VERSION-mac.zip and place it in your path.Please be aware that the 'oc cluster' set of commands are only available in the 1.3+ or newer releases.
Open Terminal and run
$ oc cluster up
To stop your cluster, run:
$ oc cluster down根据官方文档编写:
1:先安装Docker For Mac. 具体如何安装,请查看上一篇博客
2:配置Docker文件,我的配置如下:
![MacOS with Docker for Mac[使用oc cluster up 安装openshift origin]_管理工具](https://file.cfanz.cn/uploads/png/2022/03/18/7/8N3f0168ff.png)
3:Install socat
如果brew命令不能用,请安装:
brew是什么? 是在Mac OSX系统上操作软件包管理工具
同样的:Linux 中Red Hat 使用yum,Ubuntu使用apt-get,Mac OSX中就使用brew了。
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"将以上命令粘贴至终端
然后,再安装:
brew install socat4:安装OC命令:
brew install openshift-cli
5:启动cluster
![MacOS with Docker for Mac[使用oc cluster up 安装openshift origin]_管理工具_02](https://file.cfanz.cn/uploads/png/2022/03/18/7/56D972648X.png)
参考地址:
https://www.openshift.com/devpreview/register.html










