Install OpenShift using Docker and oc tool on CentOS

In the previous tutorial, I showed you how to install OpenShift using Docker and oc tool on macOS, installing OpenShift using these two tools on CentOS has some differences. I will guide you in this tutorial!

First, you need to install the Docker.

Install OpenShift using Docker and oc tool on CentOS

For oc tool, you just need to download its latest version at https://github.com/openshift/origin/releases and extract it.

Install OpenShift using Docker and oc tool on CentOS

Similar to installing OpenShift on macOS, we need to configure an insecure-registry with 172.30.0.0/16 address in Docker’s daemon.json configuration file.

Please open Terminal and go to /etc/docker/ directory, then open the daemon.json file to configure this 172.30.0.0/16 address, as follows:

Please restart Docker after running this command:

Another thing we need to do to install OpenShift on CentOS using Docker and oc tool is that we need to make sure that the CentOS firewall allows the Docker containers access OpenShift master API (8443/tcp) and DNS (53/udp).

To do this, you need to check the Docker bridge network container subnet by running the following command:

The result of this command should be 172.17.0.0/16.

Then you run the following commands to create the firewall zone and assign access to it, to OpenShift master API and DNS ports:

Result:

Install OpenShift using Docker and oc tool on CentOS

Now you can run the oc cluster up command.

Please open Terminal and go to the extracted folder of the oc tool and run the following command:

Result:

Install OpenShift using Docker and oc tool on CentOS

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

Add Comment