Cloud Computing, DevOps, Google Cloud (GCP)

6 Mins Read

A Guide to Deploy RedHat OpenShift on GCP – Part 2


This blog will walk you through the process of creating an OpenShift cluster in Google Cloud using the automation scripts included in this project.

Containerized services are managed using Kubernetes or OpenShift. Upgrades, failover, and service provisioning can all be automated. Container deployment, operation, scaling, and maintenance are thus simplified and automated for administrators.


  • GCP Account
  • RedHat OpenShift
  • Enabling API services in GCP




Note: If you plan to deploy your cluster in one of the following regions, you will exceed the maximum storage quota and are likely to exceed the CPU quota limit.

“Great Services come with great quota”

  • Cloud Migration
  • Devops
  • AIML & IoT
Know More

Step-by-Step Guide

Step 1 – Create Service Account, Assign Roles and Key

Create Service Account

1. Open GCP console > YOUR PROJECT NAME > IAM & Admin > Service Accounts > Create Service Account

2. Add Your Service Account Name

3. Add your Service Account ID


4. Create and Continue

5. Assign rolls to your Service Account


  • compute admin
  • security admin
  • storage admin
  • service account admin
  • service account user
  • service account key admin
  • service Usage admin
  • DNS Administrator

6. Click on Done

7. Go to Your service account

a. Click on KEYS > Add Key > Create New

b. Select key type as JSON


Step 2 – Create DNS Zone

1. Open GCP console > YOUR PROJECT NAME > Network & Services > Cloud DNS > Create a DNS Zone

2. Click on Public

3. Add Zone Your Name

4. Add DNS name (Your Base Domain)

5. Click Create


Step 3 – Create Host VM to Deploy OpenShift Cluster

1. Open GCP console > YOUR PROJECT NAME > Compute > Create an Instance

2. Add your Name.

3. Choose Your Regions and Zone. (Page 4)

4. Select your Machine Configuration as E2-medium


5. Change your Boot Disk

a. ubuntu

b. Size 50


6. Change the Access scopes to Allow full access to all Cloud APIs

7. Check the Firewall for Http & Https Traffic.

8. Click create.


Step 4 – Setup OpenShift on Host VM

1. Select your VM that was previously created

2. Click on SSH


Your Host VM SSH Terminal


3. Enable the APIs needed to create a cluster


4. Create ssh-key for cluster

5. To check key is created


6. Copy your JSON key to your host VM

a. Copy your JSON file to Host VM

b. Create a file in Host VM vi key.json > paste the Keys

c. Check the File with cat key.json


7. Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the full path to your service account private key file.


8. To activate your service account in Host VM

a. Copy your service account email

b. Paste the command with your service account email and key


9. Now go to

a. Click on Clusters > Create Cluster > Click on GCP Platform > Select installer-provisioned infrastructure

b. copy link of Download Installer & Command line tool

c. Copy pull secrets


10. Download OpenShift Installer & Command Line Interface in Host VM


11. Extract the file and move it to


12. Now we have to create a configuration file for cluster

This command creates a template of install-config.yaml


13. Now create a directory as mkdir install

14. Now copy the config file inside the install directory & make changes as per your needs


15. Now run the command to create a cluster from your configuration file


You can see the 2 new nodes created by


To check cluster is created in the RedHat




Step 5: Deploy the nginx server in OpenShift Cluster

1. Create nginx yaml script

2. Copy below nginx.yaml script save it

3. Now run the following commands


4. Go to your browser and paste the External IP of the nginx server



The built-in Kubernetes support makes operating a PaaS environment very straightforward, and the powerful management tools make day-to-day management a breeze. The platform handles resource intensive workloads like elastic search and media streaming. It’s also worth noting that the platform performs exceptionally well under load. For example, I saw almost no latency when running tests that subjected the applications to excessive demand. However, there are some aspects of the platform that could be improved.

In particular, I would very much like to see additional support for additional cloud providers. Currently, only the RHEL ecosystems are supported, so organizations that prefer to host their platforms on other OS will need to look elsewhere for their solutions. Finally, the cost of maintaining the platform could be reduced if the platform were hosted in regions that are closer to customers’ locations. As we discussed in the last post, this would help to reduce latency and provide more consistent performance. All in all, though, the OpenShift on Google Cloud Platform is a great solution for organizations looking to deploy and operate complex multi-tier applications in the cloud.

I hope that this guide will be useful to anyone who is trying to deploy and run applications on the OpenShift in GCP.

Get your new hires billable within 1-60 days. Experience our Capability Development Framework today.

  • Cloud Training
  • Customized Training
  • Experiential Learning
Read More

About CloudThat

CloudThat is also the official AWS (Amazon Web Services) Advanced Consulting Partner and Training partner and Microsoft gold partner, helping people develop knowledge of the cloud and help their businesses aim for higher goals using best in industry cloud computing practices and expertise. We are on a mission to build a robust cloud computing ecosystem by disseminating knowledge on technological intricacies within the cloud space. Our blogs, webinars, case studies, and white papers enable all the stakeholders in the cloud computing sphere.

Drop a query if you have any questions regarding Kubernetes, VMware, vSphere, or any other services and I will get back to you quickly.

To get started, go through our Consultancy page and Managed Services Package that is CloudThat’s offerings.


1. Is OpenShift free to use?

ANS: – OpenShift offers a free starter tier for experimentation, testing, and development. When you are ready to put your application into production and make it available to others, or if you require more resources than the free tier provides, you can upgrade to the paid tier.

2. Is OpenShift open source?

ANS: – Red Hat OpenShift is an enterprise grade open-source application platform that accelerates the development and delivery of cloud-native applications across hybrid and multi-cloud environments, all the way to the edge.

3. How do I install OpenShift on my computer?

ANS: – To quickly start up an OpenShift cluster locally inside of a virtual machine (VM), you can use Red Hat Code Ready Containers. CodeReady Containers requires a hypervisor to run the VM containing OpenShift.

  • VMware
  • Virtual Box

WRITTEN BY Navneet Nirmal Toppo

Navneet is a Research Associate at CloudThat. He is a Microsoft Certified Solution Professional and a Certified Network Security Specialist and who has experience in AWS, Azure, GCP & vSphere. He is passionate about cloud computing, cybersecurity, and learning new cloud-native technologies who strives to provide the best cloud experience to clients through transparency.



    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!