OpenShift 4 UPI Installation on Libvirt/KVM

I am writing this blog post to document the procedure of installing OpenShift 4 UPI (User Provisioned Infrastructure) on KVM/Libvirt using the Baremetal procedure as reference. This can be a useful reference if you are looking to:

All you need is an internet connected host that has enough CPU/Memory and virtualization support for KVM.

If you follow along, by the end of this post, you should have a working OpenShift 4 cluster with 3 master nodes, 2 worker nodes and a VM acting as the external load balancer.

Prerequisites and Assumptions

Installation Procedure

I am following the OpenShift 4 UPI Installation documentation for bare-metal with some minor tweaks to get it working on KVM, so I recommend going through it once, if you haven’t already.

Note: I have intentionally tried to make this copy-paste friendly, to make it easily reproducible. This is my usual style of documenting setup procedures. It is expected that you start in single bash session and run these stream of commands one by one. Each block section is copy-paste-able at a time. If you find any breaking points or have any suggestions, please drop me a line.

1- Download Files and Setup Environment

2- Create the Red Hat CoreOS and Load Balancer VMs

3- Setup DNS and Load balancing

4- BootStrap OpenShift 4 Cluster

5- Finish Installation and Access the Cluster

Known Issues