Announcement

Collapse
No announcement yet.

KVM or Virtualbox on Ubuntu 20.04 (for learning Kubernetes)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • KVM or Virtualbox on Ubuntu 20.04 (for learning Kubernetes)

    Hi,

    I would like to practice Kubernetes by setting up a multi-nodes cluster. The workload would be very light as the main focus is to learn Kubernetes. The most convenient resource for me would be to simulate the nodes by using VMs. Fortunately, other people had already done with Ubuntu and Virtualbox and it seems working:I could of course follow the instructions. Except that I have read a few articles about KVM on Linux. I would summarize as KVM beats Virtualbox in performance but is harder to use. I am a Linux friendly user, my need of VM is modest: the OS inside the VM would be Ubuntu server 20.04. There is no need of graphical interface, remote desktop. I would simply use SSH to connect to the VMs.

    I am willing to go that extra mile to use KVM (which I don't know) instead of Virtualbox (which I know well). With the condition that it is not too hard to setup/learn KVM. Because my goal is to learn Kubernetes. The VMs are just a mere convenience (1 single machine, less noise). Sorry for the long intro, the main focus of my question would be to get an advice if KVM is worth the learning curve.

    Q1. How stable and usable, is KVM in 2020?
    Q2. What is the estimated time to learn and get acquainted with KVM, providing that I am familiar with Linux but not expert. My main work environment is MacOS and Linux.
    Q3. Can a Vagrant script be adapted to use KVM instead of Virtualbox?
    Q4. Let's assume all VMs (whether KVM or VB) are working OK on the Ubuntu 20.04 desktop host. Is it reliable to suspend/restart the host frequently? This is mainly for convenience, less noise at night.

    Q5. In case any of you already went through the same journey of setting up a multi-nodes Kubernetes cluster using VMs. I would appreciate any advice b/c I am sure there are tons of difficulties ahead that I don't know yet (which Linux base, premade Vagrant image, way to trim down the size of the OS in VM, tricks for maintenance, etc.)

    HW Specs of the host:
    • AMD FX-8320, 8 cores, 32 GB ram, 256GB SSD
    • Ubuntu Desktop 20.04, Gnome 3.36, need to be a desktop OS, to surf web, read docs, practice exercises, online courses.
    Thanks in advance for any help

  • #2
    Answer to myself after 2.5y, in case this could be of interest for anyone.

    I did spend around a month to learn KVM. Then use Ubuntu desktop + KVM to created 4 VMs to build a local Kubernetes cluster. I would discourage this approach. Because the overhead of learning KVM and the money spent on the server hardware doesn't pay off.

    It is more effective to concentrate the time on learning Kubernetes. The simplest way is just because online course can provision you with a Kubernetes cluster for practice. Example: Udemy course Kubernetes Certified Application Developer (CKAD) with Tests

    After clearing the overhead of learning Kubernetes, work projects allow me to have access to real clusters where I could practice for real. As a matter of fact, I used very little of my local Kubernetes cluster after I built it.

    Then through work, I came to learn about Terraform which is a more efficient way to provision infrastructure as code. I could practice on kubernetes and cloud without having to use the Cloud management UI to do the exercises manually (slow and costly). Generally I would write Terraform code, then apply it and verify the results then tear down the resources shortly after. Using my own cloud account, the monthly bill is negligible.

    Comment

    Working...
    X