Kubevirt and FCOS

Gursewak Mangat
2 min readMar 25, 2024

KubeVirt, Fedora CoreOS, and OpenShift: Understanding Their Roles in the Kubernetes Ecosystem

KubeVirt, Fedora CoreOS (FCOS), and OpenShift all play important roles in the Kubernetes ecosystem, but they serve distinct purposes. Here’s how they relate to one another:

KubeVirt

KubeVirt extends Kubernetes by enabling users to run virtual machines (VMs) alongside containerized workloads within a Kubernetes cluster. It provides APIs and management tools, allowing Kubernetes to orchestrate and manage both containers and VMs in a unified environment.

Fedora CoreOS

Fedora CoreOS is a lightweight, container-optimized operating system designed specifically for running Kubernetes workloads. It is built with automatic updates, enhanced security, and minimal overhead. FCOS serves as an ideal base for deploying containerized applications and infrastructure components within a Kubernetes cluster.

OpenShift

OpenShift is an enterprise-grade container application platform based on Kubernetes. While it includes Kubernetes at its core, OpenShift also integrates additional features such as built-in CI/CD pipelines, a container registry, service mesh capabilities, and enhanced security features. Notably, OpenShift includes native support for running virtual machines via KubeVirt, offering a seamless way to manage both containerized and virtualized workloads.

Summary

  • KubeVirt enables running VMs in Kubernetes.
  • Fedora CoreOS is an OS optimized for containerized workloads on Kubernetes.
  • OpenShift is a comprehensive Kubernetes-based platform that includes support for KubeVirt.

Provisioning Fedora CoreOS on KubeVirt

To deploy Fedora CoreOS in a KubeVirt environment, you’ll need an Ignition configuration file for system customization. Additionally, ensure you have access to a Kubernetes cluster with KubeVirt installed.

Creating and Uploading a KubeVirt Container Disk

To provision Fedora CoreOS in KubeVirt, create a container disk as an OCI archive and upload it to a container registry. Tools like buildah and skopeo are used for building and pushing the image.

Build the OCI Archive

cosa buildextend-kubevirt
qemu-img convert -f qcow2 -O qcow2 fedora-coreos.qcow2 kubevirt-coreos.qcow2
buildah from scratch
buildah add --chmod 0555 working-container kubevirt-coreos.qcow2 /disk/coreos.img
buildah commit working-container
buildah push --format oci kubevirt-coreos.ociarchive

Upload the OCI Archive

cosa buildextend-kubevirt --upload --repository "quay.io/gurssing"
skopeo copy oci-archive:kubevirt-coreos.ociarchive docker://quay.io/gurssing/fedora-coreos:latest

Generate and Inspect Metadata

cosa generate-release-meta
cat builds/release.json | jq

This metadata includes the image location, SHA-256 checksum, and signature details for verifying the integrity of the uploaded Fedora CoreOS image.

By following these steps, you can efficiently deploy Fedora CoreOS within a KubeVirt environment, leveraging Kubernetes’ orchestration capabilities to manage both VMs and containers seamlessly.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Gursewak Mangat
Gursewak Mangat

Written by Gursewak Mangat

0 Followers

I write these articles to keep my brain from buffering; mainly on OS development, containerization, and the Linux world.

No responses yet

Write a response