Install OpenShift using Docker and oc tool on macOS

You already know about Docker and Kubernetes with their benefits in developing, deploying, and running applications on production environments. To make it easy and convenient to use Docker and Kubernetes, a platform called OpenShift has been introduced. OpenShift will make us easy to create Docker Images, easily create Pods containing one or more containers from those Docker images with Kubernetes, easily deploy applications and monitor them. In this tutorial, I will guide you on how to install OpenShift on macOS using Docker and the Command Line Interface oc tool!

To do this, the first thing we need to do is make sure Docker and oc tool are installed on your computer.

One thing to keep in mind is that the latest versions of Docker Desktop for Mac are currently having issues with Proxy support to pull or push Docker Image onto Docker Registry.

During the deployment of an application, OpenShift will need to pull or push Docker Image onto an OpenShift Docker Registry with IP of 172.30.1.1, the latest versions of Docker Desktop for Mac, fix the Docker’s Proxy information when connecting to OpenShift Docker Registry and not giving us by-pass this IP address.

Only version 17.09.1-ce-mac42 is working normally with this function.

So, please download Docker Desktop for Mac version 17.09.1-ce-mac42 at https://download.docker.com/mac/stable/21090/Docker.dmg and install it!

Mine is as follows:

Install OpenShift using Docker and oc tool on macOS

You need to configure the Proxies tab to by-pass IP 172.30.1.1 as follows:

Install OpenShift using Docker and oc tool on macOS

Another thing you need to do to be able to install OpenShift with this version of Docker is to create a folder called device-plugins at /var/lib/kubelet/device-plugins and configure it in the File Sharing tab as follows:

Install OpenShift using Docker and oc tool on macOS

Remember to set permissions for this folder:

My Command Line Interface oc is as follows:

Install OpenShift using Docker and oc tool on macOS

Next, you need to run the “oc cluster up” command to install OpenShift.

When running the above command, you may get the following error on macOS:

then, you can add an insecure-registry 172.30.0.0/16 to Docker’s Daemon tab:

Install OpenShift using Docker and oc tool on macOS

then rerun the above command.

Or you can run the oc cluster up command as follows:

if you do not want to add insecure registry 172.30.0.0/16 on Docker’s Daemon tab.

If the following error occurs:

then use macOS Homebrew to install socat:

Result:

Install OpenShift using Docker and oc tool on macOS

Now you can login to OpenShift using the oc or web console tool!

With the oc tool, you can use the following command:

Install OpenShift using Docker and oc tool on macOS

If using the web console, please open the browser and go to the following address: https://127.0.0.1:8443/console/. You will see the login screen as follows:

Install OpenShift using Docker and oc tool on macOS

Using user as developer with password is any character to login, you will see the following result:

Install OpenShift using Docker and oc tool on macOS

Now that we’re done installing OpenShift, guys.

Chia sẽ bài viết này ...Share on Facebook
Facebook
0Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin

Add Comment