The installation of OpenShift in VMware vSphere zones
Here in this blog, we are going to learn how the installation of OpenShift in VMware vSphere zones. Think of yourself as the person in charge of managing an OpenShift cluster in a vSphere environment. Your VMware ESXi hypervisors start failing all of a sudden, taking down your entire cluster. Your business loses time and money during the outage, in addition to the hassle of getting everything back up and running. What if there was a method to do away with these single points of failure and maintain the availability of your OpenShift cluster even in the event of a catastrophe? You may accomplish that thanks to a new functionality added in OpenShift 4.13. Learn how this revolutionary feature improves your OpenShift deployment by reading on.
Distribute OpenShift nodes across vSphere Data Centers and Clusters
We use OpenShift with regions and zones, and we can now use vSphere Data Centres and Clusters to correctly spread your OpenShift cluster across vSphere data centers and vSphere clusters in a single VMware vCenter. This is how:
Regions: A region is a vSphere Data Centre with an attached tag, according to the definition. The openshift-region tag category is where this tag must belong.
Zones: A vSphere Cluster that has an attached tag is defined as a zone. The tag used for zones must belong to the openshift-zone tag category, much like the tag used for regions.
You must build a failure domain in OpenShift, which groups vSphere resources, in order to map OpenShift regions and zones to vSphere data centers and clusters.
For example, suppose you want to designate the vSphere Data Centres “datacenter1,” “datacenter2,” and “datacenter3” as the regions “dc-east,” “dc-west,” and “dc-north,” respectively, with the zones “east-1a,” “west-1a,” and “north-1a” within each of them.
After that, you want your failure domain to stay within each vSphere data center’s “cluster1” vSphere clusters.
Your master and worker nodes should be distributed throughout the three failure domains “dc-east-1,” “dc-west-1,” and “dc-north-1,” which stand for the aforementioned structures.
Adding the configuration
Now that we have these names for vSphere Data Centres and Clusters, we need a mechanism to link them to OpenShift zones and regions in vSphere. To do this, we’ll utilize vCenter tags with a VMware tool called “govc”:
# Create the tag categories govc tags.category.create -d "OpenShift region" openshift-region govc tags.category.create -d "OpenShift zone" openshift-zone # Create the region tags govc tags.create -c openshift-region dc-east govc tags.create -c openshift-region dc-west govc tags.create -c openshift-region dc-north # Create the zone tags govc tags.create -c openshift-zone east-1a govc tags.create -c openshift-zone west-1a govc tags.create -c openshift-zone north-1a # Attach the region tags to vCenter datacenters govc tags.attach -c openshift-region dc-east /datacenter1 govc tags.attach -c openshift-region dc-west /datacenter2 govc tags.attach -c openshift-region dc-north /datacenter3 # Attach the zone tags to vCenter clusters govc tags.attach -c openshift-zone east-1a /datacenter1/cluster1 govc tags.attach -c openshift-zone west-1a /datacenter2/cluster1 govc tags.attach -c openshift-zone north-1a /datacenter3/cluster1
Afterward, in your install-config.yaml file, specify your logical failure domains:
apiVersion: v1 baseDomain: devcluster.openshift.com metadata: name: mycluster controlPlane: name: master replicas: 3 platform: vsphere: zones: - "dc-east-1" - "dc-west-1" - "dc-north-1" compute: - name: worker replicas: 3 platform: vsphere: zones: - "dc-east-1" - "dc-west-1" - "dc-north-1" platform: vSphere: vcenters: [] failureDomains: - name: dc-east-1 region: dc-east zone: east-1a server: myvcenter.devcluster.openshift.com topology: datacenter: datacenter1 computeCluster: /datacenter1/cluster1 networks: - my-port-group-in-dc1 datastore: /datacenter1/datastore/share1 - name: dc-west-1 region: dc-west zone: west-1a server: myvcenter.devcluster.openshift.com topology: datacenter: datacenter2 computeCluster: /datacenter2/cluster1 networks: - my-port-group-in-dc2 datastore: /datacenter2/datastore/share1 - name: dc-north-1 region: dc-north zone: north-1a server: myvcenter.devcluster.openshift.com topology: datacenter: datacenter3 computeCluster: /datacenter3/cluster1 networks: - my-port-group-in-dc3 datastore: /datacenter3/datastore/share1
Conclusion
The risk of downtime in the event of a failure is decreased by employing regions and zones to deploy OpenShift nodes across various VMware vSphere clusters and data centers in a single VMware vCenter. With this functionality, you can be certain that your OpenShift cluster is more resilient and highly available, giving you and your company peace of mind. Learn how to use this capability and enhance your OpenShift setup on VMware vSphere by reading on.