Overview
This is a note on using multipass during an attempt to migrate a personal development application, structured with docker-compose, to Kubernetes (k3s).
Ultimately, the migration was not completed...
k3s is a CNCF-certified Kubernetes distribution. It's designed for IoT and edge computing use cases. It's useful when you want to save memory, don't need the scale of full Kubernetes, or just want to try Kubernetes easily. It can also be an option for individuals wanting to implement Kubernetes on a VPS.
cf. K3s on ConoHa
Functionally, k3s is almost the same as Kubernetes, but it has some limitations. For details, refer to the documentation.
cf. docs.k3s.io
What is multipass?
A tool that allows you to easily create Ubuntu virtual environments. It supports Linux, macOS, and Windows.
Why use multipass?
I needed to set up a virtual environment on macOS as a runtime for k3s.
cf. Can I install k3s on macos (big sur) with m1 chip?
There are several alternatives, but I decided to try multipass because it seemed easy and accessible.
Running k3s with multipass
On macOS, you can install multipass with brew and run k3s with just the following steps:
mutipass find// Search for Ubuntu imagesmultipass launch -c 2 -m 4G -d 50G -n example 22.10// 22.10 is the Ubuntu versionmultipass mount ./k3s/ example:~/k3s// Mountmultipass shell example// Connect to the virtual machinecurl -sfL https://get.k3s.io | sh -// Install k8s on the virtual machine
cf.