Installing Red Hat OpenShift Container Platform on Google Cloud
HTML-код
- Опубликовано: 3 июн 2021
- Having done a ton of videos about Ansible Tower and Satellite, I wanted to do an #OpenShift related one. This one is the bedrock on which I'll build a whole series of simple, introductory and more complicated videos about installing, managing and developing on OpenShift.
This video shows the installation of an OpenShift #Kubernetes cluster with three masters and two worker nodes on Google Cloud Platform. In order to do the actual installation, a couple of commands need to be executed through the #gcloud CLI first.
In order for everyone to easily follow along at home, here's a list of the commands I used to deploy this cluster:
Set some variables first:
export project=openshift-100things
export my_billing=$YOUR_GOOGLE_BILLING_ID
Create project
gcloud projects create --set-as-default $project
Link billing account
gcloud alpha billing projects link $project --billing-account="$my_billing"
Enable GCP APIs to use during OpenShift install
for api in compute.googleapis.com cloudapis.googleapis.com cloudresourcemanager.googleapis.com dns.googleapis.com iamcredentials.googleapis.com iam.googleapis.com servicemanagement.googleapis.com serviceusage.googleapis.com storage-api.googleapis.com storage-component.googleapis.com; do
gcloud services enable $api
done
Set up a delegated DNS zone
gcloud dns managed-zones create my-domain --dns-name 'my.domain.com' --description 'my demo zone'
Create a service account to use during install
gcloud iam service-accounts create initial-ocp-sa --description="Initial SA for OpenShift" --display-name="OCP SA"
Assign the needed permissions to the service account
Check [1] for a more appropriate list of permissions for production clusters
gcloud projects add-iam-policy-binding $project --member="serviceAccount:initial-ocp-sa@$project.iam.gserviceaccount.com" \
--role="roles/owner"
Create a key file for the service account
gcloud iam service-accounts keys create initial-ocp-sa.json --iam-account=initial-ocp-sa@$project.iam.gserviceaccount.com
Complete instructions are here: docs.openshift.com/container-...
After setting up the project etc., you'll need to set up NS records for you DNS zone with your DNS hosting provider. You'll also need to request additional quota for CPUs and TOTAL_SSD_GB, as showed in the video!
[1] docs.openshift.com/container-... - Наука
Appreciate this video mate, opened my eyes on the training and openshift docmuentation
great video thanks for doing. I was wondering where are the instructions to deploy openshift dedicated on gcp
Can u also please include creation of VM's for masters and workers. Also how to assign the ignition files to the corresponding machine
Hi nanu, I'm not sure what you mean. The creation of masters and workers, as well as the assignment of ignition files is done automatically when using IPI (installer provisioned infrastructure). I recommend using that unless you really have a good reason not to.
I can cover UPI (user-provided infrastructure) in a future video, which is more flexible, but I think it's more interesting to do future videos about the possibilities of OpenShift as an application platform, and not so much the underlying infrastructure.
What do you think?
Hey can you please show how you set up DNS? I got cluster installed on GCP successfully but can't access UI from the browser. kubectl/oc works.
Hi Volodymyr, can you check whether the console pods are running and the route is created correctly? If oc / kubectl works, DNS should be up, since routes to the api and to the oauth endpoint are working.