Prerequisite for deployment:-
- DHCP Network and Two Static IPs For Each Cluster.
- DNS Records – Create API VIP and Ingress VIP DNS A/AAAA and PTR Records with Cluster name
api.<cluster_name>.<base_domain>. #api.ocp4.kdinesh.in
*.apps.<cluster_name>.<base_domain>. #*. apps.ocp4.kdinesh.in
- VM With Terraform
- Linux – Centos/RedHat Template
- OpenShift Compatible vSphere Version
- Sufficient resources – RAM, CPU, Storage in vSphere env
- OpenShift License – (You can try 60 days Evaluation license)
- Internet Access (For Offline deployment, you can check the official doc)
Deployment Flow Diagram: –

Terraform Will deploy one VM, ON VM vSphere OpenShift installer, and OCP Client tools will be installed, and cluster deployment will be instantiated.
OpenShift Installer will deploy one temporary Bootstrap VM and OCP Cluster.
Once Cluster is Running, Temporary Bootstrap will be deleted automatically.
Deployment: –
Created required DNS Records.

Created Linux VM and Installed Terraform.
Created Linux-Centos8 Template in vSphere.
Created Terraform Files for deploying the OpenShift Cluster.

You can download the OpenShift deployment Terraform File using the following link – https://github.com/Dineshk1205/OCP-Terraform
Update Paraments in terraform.tfvars file and in scripts directory ocp. sh file (In ocp. sh only update parameters in first section # OCP Deployment Required)
First Run Terraform init command

Next, Run the command – Terraform apply -auto-approve
Wait a few minutes; the OpenShift cluster will be deployed based on the specified parameters.
Login to Bastion/Bootstrap VM and Check Cluster status


