Virtual Machines (VMs) Inside Kubernetes Clusters With KubeVirt

Поділитися
Вставка
  • Опубліковано 6 чер 2024
  • Kubernetes is not only about containers. Here's a proof that we can also run virtual machines in the same way we run containers. In this video, I'll show you how to create and manage virtual machines with KubeVirt.
    #kubevirt #kubernetes
    Consider joining the channel: / devopstoolkit
    ▬▬▬▬▬▬ 🔗 Additional Info 🔗 ▬▬▬▬▬▬
    ➡ Gist with the commands: gist.github.com/10e94ae71e24a...
    🔗 KubeVirt: kubevirt.io
    🎬 What Is Kubernetes (k8s)? Kubernetes Explained: • What Is Kubernetes (k8...
    ▬▬▬▬▬▬ 💰 Sponsoships 💰 ▬▬▬▬▬▬
    If you are interested in sponsoring this channel, please use calendly.com/vfarcic/meet to book a timeslot that suits you, and we'll go over the details. Or feel free to contact me over Twitter or LinkedIn (see below).
    ▬▬▬▬▬▬ 👋 Contact me 👋 ▬▬▬▬▬▬
    ➡ Twitter: / vfarcic
    ➡ LinkedIn: / viktorfarcic
    ▬▬▬▬▬▬ 🚀 Courses, books, and podcasts 🚀 ▬▬▬▬▬▬
    📚 Books and courses: www.devopstoolkitseries.com
    🎤 Podcast: www.devopsparadox.com/
    💬 Live streams: / devopsparadox
    ▬▬▬▬▬▬ ⏱ Timecodes ⏱ ▬▬▬▬▬▬
    00:00 Introduction To KubeVirt
    02:35 Create And Manage Virtual Machines With KubeVirt
    12:04 KubeVirt Pros And Cons
  • Наука та технологія

КОМЕНТАРІ • 49

  • @DevOpsToolkit
    @DevOpsToolkit  Рік тому +8

    Does it make sense to manage your virtual machines through Kubernetes?

    • @cheebadigga4092
      @cheebadigga4092 Рік тому +2

      I think generally it does. I would compare the behaviour to GitHub Actions VMs - they are created for a job request and destroyed after that job is done. Don't know if they actually use KubeVirt or Crossplane or something else, but I guess that's the same principal. KubeVirt is probably of much more use to companies or services they provide than me for example for my own private stuff. Though, maybe it will grow to become the control plane of hypervisors of the future, who knows :)

    • @DevOpsToolkit
      @DevOpsToolkit  Рік тому +3

      I fully 💯. KubeVirt is better suited for service providers and those running on-prem. For end users using cloud, it makes much more sense to use managed VMs through crossplane or some similar solution.

    • @parodio1
      @parodio1 Місяць тому +1

      Managing VMs using k8s sounds to me more like a nightmare. There are already specific software solutions for managing VMs on all scales, from a single on-prem server to whole datacenters. Kubevirt only makes sense to me if you need to manage VM infrastructure and know nothing about VM management, but know how to manage k8s.

    • @DevOpsToolkit
      @DevOpsToolkit  Місяць тому

      @parodio1 ...or if you want a single API for more than only VMs... or if you want to combine VM management with the rest of the ecosystem.

  • @mohamedhabas7391
    @mohamedhabas7391 Рік тому +1

    your channel is really underrated

  • @LampJustin
    @LampJustin Рік тому +10

    Actually the VM ran as expected the thing you missed is that you did not ssh into it but attached to it's tty. If you pay attention to the first 2 lines printed into your console after attaching to the VM, they tell you the key combo to exit out of the tty. ;)

    • @DevOpsToolkit
      @DevOpsToolkit  Рік тому +2

      You're right. I did not pay attention :(

  • @rotemrefael3355
    @rotemrefael3355 Рік тому +3

    One thing i learned about kubeVirt is that there is no "double" virtual env, i mean, your k8s cluster should be bare-metal, which makes it a bit harder to implement in lots of companies . thanks for this video, uploading this make kubeVirt a real talk out there :)

    • @3o1415926535
      @3o1415926535 10 місяців тому +1

      I wanted to know the point you mentioned.

  • @dirien
    @dirien Рік тому +1

    Nice, we use KubeVirt on our vSphere clusters!

    • @kujinke
      @kujinke Рік тому +3

      This means you are doing Nested Virtualization, which has affect on overhead and performance overall. I would not recommend on doing so for production environments. maybe for testing and stuff like that.

  • @sidhantkhanna3298
    @sidhantkhanna3298 Рік тому +1

    Thanks

  • @tamaratiny
    @tamaratiny Рік тому +1

    Thanks for this video ❤️.
    This product is insane and very well documented. You can tell from reading the docs, that this is an expert level team, far exceeding my knowledge at the moment, but still able to explain everything at my level.
    We have some old Delphi client applications we want to put in the cloud.
    This technologie in combination with something like Thinfinity VirtualUI, should do the job, don't you think?
    I'm just a little concerned, and in the dark, about CAL licencing, when deploying Windows VM instances.
    Do you have any knowledge/idea about handling the Microsoft Licensing model legally?

    • @DevOpsToolkit
      @DevOpsToolkit  Рік тому

      It's been years since I used Windows directly (companies I work with do) so I'm not sure how licensing works these days :(

  • @RoaiDude1
    @RoaiDude1 Рік тому +2

    Hi Viktor! Great as always!
    Can you do one on kata containers and fire cracker? Are they providing the same capabilities?

    • @DevOpsToolkit
      @DevOpsToolkit  Рік тому

      Adding it to my TODO list... :)

    • @DanielRolfe
      @DanielRolfe Рік тому +1

      Yep I’m interested in kata also, I think Atlassian have one of the largest kata deployments

    • @LampJustin
      @LampJustin Рік тому +2

      Actually Kata is quite different to kubevirt. Kata is being used to start normal containers as VMs. This is primarily for security and not to run general purpose VMs like you do with kubevirt. Firecracker on the other hand is merely the technology to run VMs very fast with kvm. Hope this helps :)

  • @zous89
    @zous89 Рік тому +1

    Hi Viktor, can I ask which provider Bare Metal Provider you are using for the demo ? Thank you.

    • @DevOpsToolkit
      @DevOpsToolkit  Рік тому

      I haven't been using bare metal for the demo. Unfortunately, I do not have servers in my office, and I'm trying to avoid mixing this channel with the "real" work (and infra I use there). So, for the demo, (I think) I used a k8s cluster in DigitalOcean. Any k8s cluster should do though. as long as privileged access is enabled.

    • @dirien
      @dirien Рік тому

      @@DevOpsToolkit Ahh didn't know that DO has virt in virt enabled! Thx for this! I use Civo to test KubeVirt!

  • @kujinke
    @kujinke Рік тому +1

    I have installed kubevirt almost 2 years ago on some of my baremetal rancher clusters, I was having horrible performance issues, disk to be precise, it was damn slow, I was trying to install our windows domain controller as a VM, funny thing is my storageclass was based of trident and I was using a damn fast NetApp AFF storage. Also note that RedHat are implementing kubevirt as part of openshift to provide a complete solution. Anyway, there is another solution by rancher labs called Harvester which might help those wanting to run kubernetes and vms.

    • @dirien
      @dirien Рік тому +4

      Harvester has KubeVirt under the hood.

    • @kujinke
      @kujinke Рік тому +1

      @@dirien Wasn't saying it doesn't, just wanted to let the followers know about the different solutions containing it.

  • @ioannisgko
    @ioannisgko Рік тому +1

    Thank you very much for the video. I suppose we can only have Linux VMs, correct?
    Off topic: it would be a good idea for a future video to explore how we can have workers with Windows in a Kubernetes cluster that uses Calico in bare metal. I am trying a proof of concept myself, I have Linux to Windows pods communication and vice versa, but from inside the Windows pods I cannot access the outside world (I can only access whatever pods are inside the cluster)

    • @DevOpsToolkit
      @DevOpsToolkit  Рік тому +1

      I already have that only my todo list. I'll move it closer to the top.

    • @ugopalatucci
      @ugopalatucci Рік тому +6

      Also windows vms. Kubevirt is used in openshift and offer also windows vms. I'm working on the openshift virtualization console

  • @vitusyu9583
    @vitusyu9583 6 днів тому +1

    Excuse for a novice or silly question: you mean k8 can manage outside the cluster using cross plane or cluster api. Can you tell me bit more what and how cluster api can manage outside things? any example u can give? thx

    • @DevOpsToolkit
      @DevOpsToolkit  6 днів тому

      Kubernetes is based on controllers that perform some operations. Those operations can be anything. The controller that managed pods does that by talking to container runtime that spins up containers. Those are inside the cluster. Ingress controller manages external load balancers. Those are outside the cluster. Persistent volumes are storage also outside cluster that get attached to containers or nodes. Hence, there are quite a few examples of using kubernetes to manage resources both inside and outside itself.
      Now, given that controll can be anything and manage anything, it all depends on which controllers you install. Ingress, for example, is not baked into kubernetes.you need to install it. Similarly, if you install kubevirt, cluster api, crossplane, or almost anything else in kubernetes, you get more controllers that do something and all those i just mentioned manage resources outside the cluster.
      Search for crossplane on this channel and you'll see quite a few videos, all of them showing how to extend kubernetes with Crossplane with the goal to use it as a control plane to manage resources elsewhere.

    • @vitusyu9583
      @vitusyu9583 6 днів тому +1

      I now got what you mean. Thanks for your prompt reply and explanation!

  • @norandomness
    @norandomness Рік тому +2

    I have a usecase where I need to run kubernetes inside a VM
    I wonder if this would work in this scenario

    • @DevOpsToolkit
      @DevOpsToolkit  Рік тому

      KubeVirt creates VMs inside nodes of a Kubernetes cluster. If those nodes are VMs, it would create VMs inside VMs.

    • @fabiandeutsch5730
      @fabiandeutsch5730 Рік тому +2

      With the kubevirt-cluster-api you can run Kubernets on VMs running on Kubernetes. Which is the same as running Kubernetes on vSphere or OpenStack.

  • @abdelhakamami3184
    @abdelhakamami3184 8 місяців тому +1

    can i deploy the windows vm and access it graphical from the ingress ?

    • @DevOpsToolkit
      @DevOpsToolkit  8 місяців тому

      I guess you can but cannot confirm it 100% since i haven't worked with windows for a while now.

  • @AlexDresko
    @AlexDresko Рік тому +1

    When you say "virtual machine", are you including VMs that one might remote into to perform desktop operations? That wasn't really clear from the video. Like, can I run Ubuntu Desktop in kubevirt?

    • @DevOpsToolkit
      @DevOpsToolkit  Рік тому

      I haven't tried running VMs with OS GUI (I tend to do everything from a terminal), so I cannot confirm that with certainty. Nevertheless, I don't see a reason with GUI (desktop) would not work. Those are VMs like any others. The major difference is that they are managed by Kubernetes (with all the good things that entail).

    • @AlexDresko
      @AlexDresko Рік тому +2

      @@DevOpsToolkit Thanks. I might do some research and report back if I find an answer.

    • @fabiandeutsch5730
      @fabiandeutsch5730 Рік тому +2

      Desktops can be run in KubeVirt VMs as well. However, accessing these environments is the more difficult part - virtctl vnc is only recommended for admin access. Thus if you want to desktop-y stuff on your Desktop VM, then you need RDP, Citrix or something like this

  • @bijayajena6756
    @bijayajena6756 3 місяці тому +1

    can we deploy a windows vm aswell

    • @DevOpsToolkit
      @DevOpsToolkit  3 місяці тому

      I haven't tried windows, so i can only guess that the answer is yes. It should not matter what's the OS of a VM.

  • @ssxsdf234hleskwe3
    @ssxsdf234hleskwe3 3 місяці тому +1

    Has anyone tried to deploy KubeVirt on AWS EKS?
    I have successfully deployed the KV operator/controller but the VM creation process is failing because it cannot find libvert service.
    I am configured to use emulation but i feel like it may not be possible to run on AWS nodes that are VMs themselves.
    Wondering if only real way to do it is to create a NodeGroup consisting of bare metal AWS instances.
    Thoughts?

    • @DevOpsToolkit
      @DevOpsToolkit  3 місяці тому

      Personally, I think that KubeVirt makes much more sense on-prem than in hyperscalers like AWS. It's probably better to create EC2 instances than VMs in a Kubernetes cluster. I tend to use Crossplane when in AWS.

    • @ssxsdf234hleskwe3
      @ssxsdf234hleskwe3 3 місяці тому +1

      @@DevOpsToolkit
      Thanks for the reply. Yeah I think that probably makes sense. We are starting to run Jenkins on k8s and need to migrate current set of jobs that use EC2 agents and are written to call docker directly. Migrating these jobs to pod agents would require a fair bit of refactoring of Jenkinsfiles. Was thinking about using KV so that all infra including VM agents would exist on same platform as opposed to split between eks and ec2 but it looks like that may not be a viable solution.

    • @DevOpsToolkit
      @DevOpsToolkit  3 місяці тому

      Try Crossplane for that (for VMs/EC2s)@@ssxsdf234hleskwe3

    • @ssxsdf234hleskwe3
      @ssxsdf234hleskwe3 3 місяці тому +1

      @@DevOpsToolkit
      Jenkins already has a plugin for managing EC2 instances as workers/agents so not sure it makes sense to use CrossPlane in this instance.

    • @DevOpsToolkit
      @DevOpsToolkit  3 місяці тому

      @ssxsdf234hleskwe3 I misunderstood what you're trying to do. If all you're looking for is VMs for Jenkins agents, Jenkins plugin is the way to go.