Module 2 - Scaling Virtual Machines on OpenShift
In this module we are going to finish setting up the Travel Application demo. And we are exploring the scaling options for Virtual Machines in OpenShift. This hands-on experience will demonstrate how OpenShift Virtualization enables efficient scaling and workload management.
Objectives
-
Complete the Travel Application Demo - Deploy a VM and connect it with the existing application components
-
Scaling up Virtual Machines - Increase the resources (CPU, memory) allocated to a VM to handle higher workloads efficiently.
-
Scaling out Virtual Machines - Deploy multiple VM instances to distribute workloads and enhance availability and performance.
About Scaling of Virtual Machines
OpenShift Virtualization extends Kubernetes by allowing it to manage virtual machines (VMs) alongside containers. Scaling with OpenShift Virtualization can be approached in two ways:
Scaling Up (Vertical Scaling)
Scaling up involves increasing the resources (CPU, memory, storage) allocated to a VM. This is useful when a single VM requires more power instead of distributing the workload across multiple instances.
You can modify VM Resources by editing a VirtualMachine (VM) specification to increase CPU and memory resources.
Scaling Out (Horizontal Scaling)
In general there are 3 options to scale out Virtual Machines with OpenShift Virtualization:
-
Adding additional VMs manually (or with GitOps)
-
Using a
VirtualMachineInstanceReplicaSet
resource (Not supported) -
Using a
VirtualMachinePool
resource (Dev Preview feature)
Load balancers can distribute traffic among VMs.