Infrastructure 2023-08-17

Running k3s with multipass

Exploring the use of multipass to run k3s for personal development applications.

Read in: ja
Running k3s with multipass

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.

multipass.run

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:

  1. mutipass find // Search for Ubuntu images
  2. multipass launch -c 2 -m 4G -d 50G -n example 22.10 // 22.10 is the Ubuntu version
  3. multipass mount ./k3s/ example:~/k3s // Mount
  4. multipass shell example // Connect to the virtual machine
  5. curl -sfL https://get.k3s.io | sh - // Install k8s on the virtual machine

cf.

Tags: multipass k3s
Share: 𝕏 Post Facebook Hatena
✏️ View source / Discuss on GitHub
☕ Support

If you enjoy this blog, consider supporting it. Every bit helps keep it running!


Related Articles