Skip to content

Bootstraps Kubernetes cluster using k3s on Ubuntu Multipass VMs (Linux or MacOS)

Notifications You must be signed in to change notification settings

brian-provenzano/multipass-k8s-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multipass Ubuntu + K3s = Lightweight K8s goodness

Simple project (shell script) to launch a 3 node kubernetes cluster on multipass VMs using k3s.

Useful as a lightweight local multinode lab k8s playground (e.g. replacement for MacOS K8s in Docker Desktop / KIND which is only single node).

Will also pull down the k3s kubeconfig from the k8s master using multipass copy-files and install in ~/.kube as k3s-config (can be changed in the script) so you can access the cluster from your host.

Tested on MacOS / Linux; currently uses Ubuntu 18.04 LTS for node images

K3s:

Multipass:

Usage

  1. To create a cluster, clone this repo and adjust the create.sh as needed and run it
./create.sh
  1. To start, stop, destroy the cluster (via multipass) see stop.sh, start.sh, destroy.sh - extend or modify these scripts as needed

NOTE: When stopping or destroying you may get these messages [error] [kube-worker2] process error occurred Crashed. These can be ignored. Seems to be an issue with multipass, but the VMs are cleaned up and stopped.

Directory description

  • cloud-init - contains cloud-init scripts used to boot/configure the nodes (install k3s, config for k8s etc)
  • k8s - contains sample deployment to try

License

Do as you want "AS-IS" code.

About

Bootstraps Kubernetes cluster using k3s on Ubuntu Multipass VMs (Linux or MacOS)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages