BACK TO THE HOMEPAGE

Sep 06, 2021 2 min read

Setting up ChromeOS Minikube

Recently while playing with some development tools, I was surprised to see Minikube now runs on ChromeOS. Minikube allows for a scaled down Kubernetes cluster running directly on your host machine. Kubernetes is a container orchestrator. Put simply it enables the “simplified” running of containers. In this blog post learn how to set up ChromeOS to run minikube using KVM without Developer Mode.

Asus Chromebox 2 CN62 codename: Guado:inline

Introduction

Before getting started, verify that your device has virtualisation support.

egrep -q 'vmx|svm' /proc/cpuinfo && echo yes || echo no

If the answer is yes, you are good to go!

  • Install kvm
  • Install minikube
  • Install kubectl

Install kvm

  1. Install packages
sudo apt install -y qemu-system libvirt-clients libvirt-daemon-system
  1. Add the user account to the libvirt group
sudo adduser $USER libvirt

Install Minikube

Note: Minikube will be used with the KVM driver

Config:

  • OS - Linux
  • Arch - x86-64
  • Release - Stable
  • Installer - Binary
  1. Install the binary
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
  1. Edit /etc/libvirt/qemu.conf

  2. Display user account

echo $USER
  1. Amend the entries to these settings

NOTE: The user account can be used rather than root.

user = "root"
group = "root"
remember_owner = 0

Install kubectl

  • Minikube also includes kubectl, so installation step is now optional!
  1. Install kubectl

Test Minikube

  1. Run Minikube with Kvm2
minikube start --driver=kvm2
  1. Validate nodes are operating
kubectl get nodes

OUTPUT:

NAME       STATUS   ROLES                  AGE     VERSION
minikube   Ready    control-plane          15m   v1.24.3
  1. Run a test k8s deployment
kubectl create deployment hello-node --image=k8s.gcr.io/echoserver:1.4
  1. Check the pod is running
kubectl get pods

OUTPUT:

NAME                          READY   STATUS              RESTARTS   AGE
hello-node-7567d9fdc9-zr44j   1/1     Running             0          22s
  1. Delete the deployment
kubectl delete deployment hello-node
  1. Stop Minikube
minikube stop