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.
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
- Install packages
1sudo apt install -y qemu-system libvirt-clients libvirt-daemon-system
- 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
- Install the binary
1curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
2sudo install minikube-linux-amd64 /usr/local/bin/minikube
-
Edit
/etc/libvirt/qemu.conf
-
Display user account
1echo $USER
- 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!
- Install kubectl
Test Minikube
1minikube start --driver=kvm2
- Validate nodes are operating
1kubectl get nodes
OUTPUT:
1NAME STATUS ROLES AGE VERSION
2minikube Ready control-plane 15m v1.24.3
- Run a test k8s deployment
1kubectl create deployment hello-node --image=k8s.gcr.io/echoserver:1.4
- Check the pod is running
1kubectl get pods
OUTPUT:
1NAME READY STATUS RESTARTS AGE
2hello-node-7567d9fdc9-zr44j 1/1 Running 0 22s
- Delete the deployment
1kubectl delete deployment hello-node
- Stop Minikube
1minikube stop