- Learn OpenShift
- Denis Zuev Artemii Kropachev Aleksey Usov
- 400字
- 2021-08-13 16:03:59
macOS
The installation and configuration process for macOS is very similar to that for Linux. It assumes that Docker for macOS is being used. The deployment process involves the following:
- Docker for macOS installation and configuration
- Installation of openshift-cli and required packages
- Starting a cluster
The Docker for macOS installation process is described at the official portal: https://docs.docker.com/docker-for-mac.
Once the Docker service is running, you need to configure the insecure registry (172.30.0.0/16). From the Docker menu in the toolbar, you need to select the Preferences menu and click on the Daemon icon. In the Basic tab of the configuration dialog, click on the + icon under Insecure registries and add the following new entry: 172.30.0.0/16:
![](https://epubservercos.yuewen.com/FED69C/19470390908871106/epubprivate/OEBPS/Images/945c1084-1c91-4ff0-8e0c-d2d46b8efedc.png?sign=1739572094-MwsvWnZ1y2JNZIzaMOsZHWO2D9kXAwST-0-e4d56b4dcf00bc0b89dd395d767baacd)
When finished, click on Apply & Restart.
Once the Docker service is configured, we need to install all the required software and start the cluster using the following steps:
- OpenShift client installation: Install the socat and openshift-cli packages on your system as follows:
$ brew install openshift-cli socat --force
- Starting and stopping the OpenShift cluster: The cluster can be started just like it was in Linux:
$ oc cluster up
Starting OpenShift using registry.access.redhat.com/openshift3/ose:v3.7.23 ...
OpenShift server started.
The server is accessible via web console at:
https://127.0.0.1:8443
You are logged in as:
User: developer
Password: <any value>
To login as administrator:
oc login -u system:admin
An installation verification can be performed by the OpenShift admin user, as follows:
$ oc login -u system:admin
Logged into "https://127.0.0.1:8443" as "system:admin" using existing credentials.
You have access to the following projects and can switch between them with 'oc project <projectname>':
default
kube-public
kube-system
* myproject
openshift
openshift-infra
openshift-node
Using project "myproject".
The Openshift cluster is up and ready for work. We may check the status of the cluster using the following command:
$ oc get nodes
NAME STATUS AGE VERSION
localhost Ready 20h v1.7.6+a08f5eeb62
The cluster can be stopped as follows:
$ oc cluster down