Run Containers and Virtual Machines on the Same Cluster with Red Hat OpenShift
Fri, 13 Sep 2024 14:14:55 -0000
|Read Time: 0 minutes
Introduction
Red Hat OpenShift is an excellent platform to run container workloads. It isn’t limited to containerized workloads only, though. OpenShift offers support for virtualized workloads as well. This is important because containerization and virtualization complement each other. One isn’t a replacement for the other. Today, we’ll review virtualization and how it works with OpenShift, and we'll spend some time comparing virtualization with containerization.
Reviewing Virtualization
When a business wants to virtualize a workload, the first step is to create a virtual machine (VM). To do this, a specific amount of compute, memory, and storage resources are dedicated to the new VM. An operating system is installed, and finally, the applications and any dependencies are loaded onto the VM. This creates an isolated environment for software to run.
VMs are a great option when workload isolation is needed or if a different operating system kernel is needed. For example, businesses commonly want to use Windows Active Directory for user management processes. Active Directory can’t be containerized, so the options are to either use a dedicated hardware host or cluster or to deploy a VM. Another potential use case for virtualization benefitting from isolation is the creation of testing environments for new software versions. The VM provides a safe location to run testing for new versions of monolithic, microservice-based, or serverless applications where they won’t affect, or be affected, by external software activity. VMs also offer another level of security by having dedicated operating systems. If one system were to be compromised, there would be a greater degree of containment and more limited exposure. This doesn’t mean that VMs are completely secure though. IT teams should continue to follow a range of security practices to prevent cybersecurity threats and compromised VMs from becoming a new attack vector.
Virtualized Workloads on Red Hat OpenShift
OpenShift uses an optional software resource called an operator to enable virtualization. Operators are application-specific software extensions for Kubernetes that handle the creation and management of complex applications for Kubernetes users. OpenShift, being the Red Hat supported and enhanced version of Kubernetes, also uses operators. The virtualization operator allows entire VMs to run within a container. The benefit is that containerized applications and VMs can then be run from the same OpenShift nodes. OpenShift virtualization supports many of the features administrators need, such as live migration, VM importing and cloning, dynamic storage provisioning, and many more. Once the operator is installed, VMs can be managed from the OpenShift web console, providing a graphical interface to ease management challenges. The OpenShift virtualization operator is installed on Dell APEX Cloud Platform for Red Hat OpenShift clusters by default, facilitating faster deployments that support a mix of VMs and containerized applications.
Virtualization or Containerization
Choosing between VMs and containers isn’t, and shouldn’t be, a one-or-the-other decision. Each one offers unique benefits that businesses need. Comparing the two would be like asking, “What’s better, nails or wood glue?”. It’s something that entirely depends on the task that needs accomplishing. If a business need calls for efficient resource allocation that can quickly scale both up and down, then containerization is the clear winner. On the other hand, if isolation or an operating system dependency needs to be met, virtualization can meet those requirements in a way that containers cannot. Organizations will have a mix of needs that are best met by mixed-use of both containers and VMs.
After installing the OpenShift virtualization operator, clusters support both container and VM workloads. Because OpenShift is built on Kubernetes, administrators can use the same management tools and process for both containerized and virtualized workloads. VMs run within pods, the same as a container. Pod-to-pod networking can be used without needing to expose anything further.
Conclusion
Virtualization remains an important tool for IT operations in the datacenter. Certain workloads work best in VMs, or just cannot be containerized. When mixed needs are present, tools that can meet the range of needs are ideal. OpenShift meets both the need for scalable software with containers, and the deployment of VMs, through the use of the virtualization operator. Red Hat OpenShift Virtualization, included with Dell APEX Cloud Platform for Red Hat OpenShift, provides a modern platform for organizations to run, deploy, and manage new and existing VM workloads, alongside containers and artificial intelligence and machine learning applications. To learn more about OpenShift virtualization, review Red Hat’s website to find a range of links and helpful information here.
Additional Resources
What are Red Hat OpenShift Containers? (2 of 4)
Simplify Cloud Application Deployments with Red Hat OpenShift (3 of 4)
What is Red Hat OpenShift Virtualization
APEX Cloud Platform for Red Hat OpenShift Homepage
Author: Dylan Jackson, Engineering Technologist