Setting up ChromeOS Minikube

Share on:

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.

1egrep -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
1sudo apt install -y qemu-system libvirt-clients libvirt-daemon-system
  1. Add the user account to the libvirt group
1sudo 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
1curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
2sudo install minikube-linux-amd64 /usr/local/bin/minikube
  1. Edit /etc/libvirt/qemu.conf

  2. Display user account

1echo $USER
  1. Amend the entries to these settings

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

1user = "root"
2group = "root"
3remember_owner = 0

Install kubectl

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

Test Minikube

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

OUTPUT:

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

OUTPUT:

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