Virtualization vs Containerization in 2022 home lab

 

I have been revisiting many of the infrastructure components and services running in the home lab environment. You can read my VMware Home Lab and Learning Goals 2022 post to see a few of the specific learning objectives that I have for 2022. However, as I have been revisiting many of the home lab services I have running, a question that I have been mulling over for many of my lab services is this – virtualization or containerization? Let’s take a look at virtualization vs containerization in 2022 home lab services and see the various decisions that may affect your decisions.

Virtualization vs Containerization in 2022 home lab

There is no question for me that I think virtual machines will be here for the foreseeable future. There are just too many technologies and use cases that don’t quite fit the capabilities of the containerized infrastructure. Also, I think for me and what I see in the enterprise environment, virtual machines and containers are complementary technologies, rather than competing ones. In fact, much of the container infrastructure we see in the enterprise run on virtual machines.

However, container infrastructure has very much matured now that we are in 2022. What do we mean? If you look at the landscape of container infrastructure, it is now tried and proven across multiple cloud environments and current DevOps processes. The move to microservices is very much underway across the board and the microservices, cloud-native model relies on containers.
Kubernetes cluster running in the home lab in 2022
Kubernetes cluster running in the home lab in 2022

In addition, Kubernetes has hands down won the container orchestration competition and it is the defacto standard for managing and orchestrating containers in the environment. Kubernetes is also being utilized for its rich APIs to provide integrations with other systems, etc.

There are many mature Kubernetes products on the market when we look at solutions businesses have access to now, including the following as examples

  • VMware Tanzu Kubernetes, specifically vSphere with Tanzu
  • Vanilla Kubernetes running on bare metal
  • Public cloud Kuernetes offerings – Amazon EKS, Azure AKS, and Google GKE
  • Rancher
  • Other tools

If you are like me, you probably look in your home lab and see tons of virtual machines running various services and solutions, many of which could be containerized and may have publicly available containerized versions available. In 2022, my goal is to collapse several VMs down that are running one-off services and fold these services into individual containers. Not only will this help to reclaim resources wasted on full virtual machines that may not be needed, but it also provides a way to learn about “production migrations” from virtualized resources to containerized infrastructure.

Considerations

Of course, there are always considerations that need to be made such as migrating your data. How is this to be done? Or will you start from scratch for services that may not need to have data carried over? With containers, things can get trickier from a data point of view as you have to figure out if you are going to use persistent storage or ephemeral storage and the requirements of your applications.

Great candidates for containerization instead of virtualization

What are some good candidates for containerization instead of virtualization? There are a few home lab services that make sense when it comes to running inside containers as opposed to virtual machines. These include:

  • Web servers
  • REST API services
  • Network services
  • Monitoring
  • IPAM

I have many little services spread across virtual machines that would make a great fit for running as containers in my home lab environment. How do you go about containerizing your workloads?

Containerizing VM workloads

This is a topic that I am exploring for each individual service as to the best approach for containerization and getting data from your existing virtual machine to a container workload. If your environment is like mine, you may have many services that run a backend database, such as MySQL.

Often you can find the containerized version of your services, such as a Docker Compose deployment that deploys both the application container and the backend DB container, such as a MySQL container as part of the deployment. Then, it is usually a matter of customizing the frontend container and restoring your backend MySQL DBs to restore your data.

Some solutions may have a built-in backup and restore process that allows backing up the entire configuration, including the data to a single file. The file can then be used to restore your configuration and data into your new containerized solution.

Virtualization vs Containerization wrapping up

I said it at the end of last year, even though we have certainly seen a shift to containers and Kubernetes workloads, I think 2022 will be a pivotal year with containerized and Kubernetes-driven technologies taking off even more so. I have seen many businesses that are just now ready to begin their journey with modern workloads and DevOps processes.

What about you? What services are you running in your home lab environment? Are you looking to begin containerizing more services this year than before? What is driving the decision to do that? What services are you running in your lab environment? With the supply chain issues and more expensive hardware, are you looking to reclaim resources using containerization instead of virtualization (virtual machines)?

Let me know your thoughts in the comments and any tips and tricks you have to make this process smoother. I would like to know what you guys are doing with your lab environments this year.


Post a Comment

0 Comments