1 - About KubeOpsVM

KubeOpsVM is an innovative virtualization solution that merges Kubernetes’ scalability with the flexibility of virtual machine management. By simplifying the integration of containerized workloads and virtual machines, it serves as a crucial resource for today’s infrastructure requirements.

This article describes KubeOpsVM, an advanced virtualization solution that combines the scalability of Kubernetes with the flexibility of virtual machine management. It explores how KubeOpsVM enables seamless integration between containerized workloads and virtual machines, providing a powerful tool for modern infrastructure needs.

What Is KubeOpsVM?

KubeOpsVM is a cutting-edge virtualization platform built with cloud-native principles at its core. Developed by KubeOps, it leverages Kubernetes as a foundational orchestrator, enabling enterprises to run and manage virtual machines alongside containerized workloads. This dual functionality eliminates the need for separate platforms, offering a unified infrastructure that simplifies IT management and reduces operational overhead.

Why KubeOpsVM Matters

As businesses transition to cloud-native environments, they often face challenges when managing legacy applications and workloads that rely on traditional VMs. KubeOpsVM addresses this by allowing organizations to run VMs in the same environment where they manage containers. This integration simplifies migration, optimizes resource usage, and ensures workload continuity.

KubeOpsVM supports a wide range of use cases, from running legacy enterprise applications to supporting cloud-native services requiring persistent workloads. Its compatibility with Kubernetes ensures access to powerful features like automated scaling, high availability, and efficient resource management.

Key Features Driving Innovation

KubeOpsVM distinguishes itself by delivering a robust virtualization experience through Kubernetes integration. Its primary features include:

  • Unified Management - Manage VMs and containers from a single platform.
  • Scalability - Automatically scale virtual machines as demand fluctuates.
  • High Availability - Ensure uptime through Kubernetes’ native self-healing and failover capabilities.
  • Resource Efficiency - Maximize hardware utilization by balancing containerized and virtualized workloads.

A Vision for the Future

KubeOps envisions KubeOpsVM as the future of virtualization in a cloud-native world. Its development reflects a deep understanding of modern IT infrastructure needs, particularly the shift toward container-based architectures. By enabling organizations to run VMs in Kubernetes environments, KubeOpsVM bridges the gap between legacy and modern applications, fostering a smoother digital transformation journey.

Whether you’re modernizing legacy systems, optimizing cloud deployments, or enhancing application portability, KubeOpsVM by KubeOps provides a powerful, unified solution that streamlines operations and accelerates innovation. As enterprises increasingly adopt cloud-native technologies, KubeOpsVM stands ready to drive the next era of virtualization.

2 - General Concepts of KubeOpsVM

A virtual machine is a software-simulated environment that optimizes hardware usage by running multiple operating systems and applications independently, offering security and easy backup, while KubeOpsVM extends these benefits by automating VM deployment across any node in a cluster based on resource availability, ensuring asynchronous operation and minimal intervention.

This article explores the core concepts of KubeOpsVM, a virtualization solution that integrates with Kubernetes to manage virtual machines alongside containerized workloads. It highlights how KubeOpsVM bridges traditional VMs and cloud-native systems, offering scalability and streamlined orchestration for modern infrastructure.

What is the purpose of a Virtual Machine?

A virtual machine (VM) is a software-based environment that simulates a physical computer, enabling it to run an operating system and applications independently from the host machine. Its primary purpose is to optimize hardware usage by allowing multiple operating systems to run on a single device. This setup is crucial for tasks like software development, where developers can test applications in various environments without needing separate hardware.

Security and isolation are other key advantages, as VMs keep applications separate from the host system, reducing the risk of system-wide damage from potential threats. They also simplify disaster recovery, since entire VM states can be backed up, cloned, or transferred easily. Additionally, VMs provide flexibility by enabling cross-platform compatibility, allowing users to run different operating systems simultaneously. This feature supports legacy software that might not be compatible with modern systems, ensuring continued access to older applications.

Virtual machines are integral to cloud computing, IT infrastructure, and personal computing due to their scalability, flexibility, and efficiency.

How does KubeOpsVM work?

KubeOpsVM is like a “computer inside a computer.” It allows you to run an operating system (OS) and applications in a sandboxed environment, separate from your actual physical machine.

In the example shown, any VM can be hosted on any agent (worker or master) within the cluster.

A virtual machine does not necessarily have to run on a specific machine. Depending on the current requirements, the VM is deployed on the appropriate machine in the cluster. kubevirt takes over the complete administration - no further intervention is necessary.

One of the main advantages of KubeOps virtualization is the asynchronous use and access of a VM and the deployment and execution of the VM depending on the available resources or machines. This ensures that each VM can always work independently of workloads.

3 - Install KubeOps Virtualisation on a Dedicated Machine

This guide describes how to set up virtualization using KubeOps automatic install routines. The setup takes place on a physical or virtual machine and runs automatically - only a few settings are required by the user. An ISO file is booted on the machine to set up a simple cluster with a corresponding node.

The virtualization software kubevirt and additional KubeOps products, such as KOSI package manager, are automatically installed on the node.

When the guide is carried out successfully, we have the following system:

  • one cluster
  • one running node (the node is admin and worker at the same time)
  • one virtual machine ubuntu vm running in the namepsace kubevirt
  • the vm runs the preconfigured ubuntu image

The ubuntu image is preconfigured with a username and a corresponding password.

Requirements

To follow the next steps, make sure you have your credentials ready from your KubeOps.net account and your Red Hat Subscription-Manager account.

For more information about Red Hat Subscription-Manager, refer Red Hat Online Documentation.

System Requirements

You can install the ISO on a physical machine or a virtual machine. Ensure that the machine supports the minimum system requirements.

CPU 4x
Memory 8 GB
Disk space 50 GB(unformatted non-partitioned disk storage)

Step 1 - Download the KubeOps-VM ISO File

Download the ISO file from https://kubeops.net/users-only/welcome.

Step 2 - Install the KubeOps-VM ISO

You will be prompted to make settings during the installation. Follow the instructions on the screen and enter the desired values.

  1. Boot your machine with the ISO.
  2. To start the installation, select “Install Red Hat Enterprise”.

  1. Select the hard disk where the ISO is to be installed.

  1. Configure the networking.
  • Select your preferred networking device.
  • Select whether the IP is dynamic or static.
  • Enter the IP address.
  • Enter the subnet mask address.
  • Enter the gateway address.
  • Enter the DNS server address.
  • Enter your preferred hostname. This will be the name of the machine. (no special characters)

  1. Select your preferred activation method for the Red Hat Subscription-Manager.

  2. Select your preferred security method for the grub bootloader. We recommend the option “random password” - this will set up the security automatically. For more information about the grub bootloader and its security, refer to the respective documentation.

  3. Enter your KubeOps.net account credentials.

  4. To finish the installation, follow the instructions on the screen.

Step 3 - Login to the Master Node on the Cluster

During setup using an ISO file, the master node was automatically preconfigured with a user (root) and its password.

User ko-admin
Password KubeOps2024
  1. Log in to the master node remotely. For example, using ssh. The first time you log in, you must use the preconfigured password (see above). Use the hostname or the IP address that you assigned in a previous step during the installation.
ssh ko-admin@[HOSTNAME]

or

ssh ko-admin@[IP ADDRESS]
  1. After logging in, you will be asked to change the user password. Follow the instructions on the screen. After changing the password, you will be automatically logged out.

  2. Login to the machine again using your new credentials.

  3. Most kubeops software needs root privileges. Switch to root user.

sudo -i
  1. To check the state of background configuration, run the journalctl command.
journalctl -u clustersetup.service

Keep the view open.

Check your kubeops virtualisation by using the kubectl get pods command.

kubectl get pods -n kubevirt

The installation is complete when the status of all pods is set to “Running”. For example:

Note: The Pods in the namespace kubevirt are now in a Pending state. You can either join worker nodes according to our guide How to join Nodes to a KubeOps Cluster or run the command kubectl taint node kubevirt node-role.kubernetes.io/control-plane- in order to remove the control-plain taint.

  1. To change the password of the root user, run the passwd command.
passwd

Step 4 - Install the example VM

  1. Login to the machine using your new credentials.
  2. Most kubeops software needs root privileges. Switch to root user.
sudo -i
  1. you need to create values for your machines:
ubuntuvmValues:
  name: ubuntu-vm
  namespace: kubevirt-vm 
  sshkeys:
    - key: <public ssh key, p.e. id_rsa.pub file>
  dataVolume:
    storageClassName: rook-cephfs
    source:
      secret: kubeops-auth

in this example these values are saved in the vmvalues.yaml file.

  1. Make sure you are still logged in to KOSI using your kosi username. The login is only active for 24h, after that time you need to login again.
kosi login -u [USERNAME]
  1. Use the KOSI package manager to search for available software packages. In this case, we restrict the search to KubeOps virtualization using the hub kubeops-vm and filter for ubuntu.
kosi search --hub kubeops-vm --ps ubuntu

  1. The example vm configuration is named kubevirt-ubuntu-vm. Install the package using the kosi install command.
kosi install --hub kubeops-vm kubeops/kubevirt-ubuntu-vm:1.0.0 -f vmvalues.yaml --dname ubuntu

you need to create a custom secret for that:

kubectl create secret generic kubeops-auth --from-literal=accessKeyId=<kubeopsaccount> --from-literal=secretKey="<password-token for imagepullregistry> --namespace <namespace of vm>

note: the password token is not the password directly, if the registry is connected with oicd, p.e. with keycloak.

if you want to install kubevirt in an airgap environment, then you need to have a domain address for harbor, a ip address with port address does not work. Copying the images to the corresponding nodes and loading them with containerd does not work. also you maybe need to create a secret with the name kubeops-vm, it has the same values as the kubeops-auth created by the kubeops plattform tools like rook-ceph. otherwise you can create it with the following command:

kubectl -n kubevirt create secret docker-registry kubeops-vm --docker-server=<registry for image pulling> --docker-username=<username of registry> --docker-password=<password-token for imagepullregistry>

Step 7 - Access the Example VM

You can access the example vm remotely from the master node. For example, using ssh.

  1. Login to the machine using your new credentials.
  2. Identify the IP address of your example vm by using the kubectl get vmi command.
kubectl get vmi -A

This command lists all virtual machine instances. Since we only have one VM installed, the output looks something like this.

NAMESPACE   NAME         AGE   PHASE     IP              NODENAME       READY

kubevirt    ubuntu-vm   22h   Running   192.168.16.48   stackedadmin   True
  1. Log in to the example vm remotely (e.g. using ssh). Use the IP address from the previous step. Use the credentials of the running ubuntu image from the table below.
ssh ubuntu@192.168.16.48
User (ubuntu image) ubuntu
Password (ubuntu image) ubuntu

Next Steps

For more commands for KubeOps Virtual Machines, see [Commandline Operations](Commandline Operations).