All Projects → superseb → multipass-k3s

superseb / multipass-k3s

Licence: other
Use multipass instances to create your k3s cluster

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to multipass-k3s

paas-templates
Bosh, CFAR, CFCR and OSB services templates for use with COA (cf-ops-automation) framework
Stars: ✭ 16 (-68%)
Mutual labels:  rancher, k3s
K3d
Little helper to run Rancher Lab's k3s in Docker
Stars: ✭ 3,090 (+6080%)
Mutual labels:  rancher, k3s
terraform-metal-k3s
Manage K3s (k3s.io) region clusters on Equinix Metal
Stars: ✭ 41 (-18%)
Mutual labels:  rancher, k3s
k3d-action
A GitHub Action to run lightweight ephemeral Kubernetes clusters during workflow. Fundamental advantage of this action is a full customization of embedded k3s clusters. In addition, it provides a private image registry and multi-cluster support.
Stars: ✭ 137 (+174%)
Mutual labels:  rancher, k3s
k3d-demo
Demo of k3d: Tool to run k3s (Kubernetes) in Docker
Stars: ✭ 197 (+294%)
Mutual labels:  rancher, k3s
K8s1.13
微服务容器化持续交付总体流程:开发代码提交到Gitlab;Rahcher设置代码库为Gitlab;Rahcher流水线配置编译源码;Rahcher流水线Build Docker镜像;Rancher流水线Push Docker镜像到私有镜像库Harbor;Rancher流水线根据k8s yaml部署文件部署容器。
Stars: ✭ 166 (+232%)
Mutual labels:  rancher
K3s Ansible
Ansible playbook to deploy k3s kubernetes cluster
Stars: ✭ 153 (+206%)
Mutual labels:  rancher
Rancher Active Proxy
All in one active reverse proxy for Rancher ! For Kubernetes : https://github.com/adi90x/kube-active-proxy
Stars: ✭ 149 (+198%)
Mutual labels:  rancher
Docker Handbook
Docker handbook
Stars: ✭ 133 (+166%)
Mutual labels:  rancher
kconnect
Kubernetes Connection Manager CLI
Stars: ✭ 168 (+236%)
Mutual labels:  rancher
waldur-homeport
Waldur HomePort is web-based client for the Waldur MasterMind.
Stars: ✭ 22 (-56%)
Mutual labels:  rancher
youtube-10k-pods
10,000 Kubernetes Pods for 10,000 Subscribers
Stars: ✭ 73 (+46%)
Mutual labels:  k3s
terraform-provider-rancher
Terraform Rancher provider
Stars: ✭ 35 (-30%)
Mutual labels:  rancher
k3s-minio-deployment
Instructions and manifest files for deploying MinIO Object Storage on K3s.
Stars: ✭ 46 (-8%)
Mutual labels:  k3s
azure-k3s-cluster
An Azure template to deploy a lightweight Kubernetes cluster using k3s.io
Stars: ✭ 46 (-8%)
Mutual labels:  k3s
Rancher Cron
A service that can start containers on a defined schedule.
Stars: ✭ 133 (+166%)
Mutual labels:  rancher
terraform-openstack-rke2
Deploy Kubernetes on OpenStack with RKE2
Stars: ✭ 38 (-24%)
Mutual labels:  rancher
kube-hetzner
Optimized and Maintenance-free Kubernetes on Hetzner Cloud in one command!
Stars: ✭ 937 (+1774%)
Mutual labels:  k3s
Kadalu
A lightweight Persistent storage solution for Kubernetes / OpenShift using GlusterFS in background.
Stars: ✭ 239 (+378%)
Mutual labels:  rancher
infrastructure
Flux based GitOps repository for my home lab infrastructure.
Stars: ✭ 14 (-72%)
Mutual labels:  k3s

k3s cluster on multipass instances

This script will create a configurable amount of instances using multipass, install k3s server(s) (HA using embedded etcd), and add the agent instances to the cluster.

Requirements

This is tested on MacOS, Ubuntu Linux 20.04 and Windows 10.

Running it

Clone this repo, and run the script:

bash multipass-k3s.sh

This will (defaults):

  • Generate random name for your cluster (configurable using NAME)
  • Create init-cloud-init file for server to install the first k3s server with embedded etcd (contains --cluster-init to activate embedded etcd)
  • Create one instance for the first server with 2 CPU (SERVER_CPU_MACHINE), 10G disk (SERVER_DISK_MACHINE) and 1G of memory (SERVER_MEMORY_MACHINE) using Ubuntu focal (IMAGE)
  • Create cloud-init file for server to install additional k3s servers with embedded etcd.
  • Create one instance for additional server (configurable using SERVER_COUNT_MACHINE)
  • Create cloud-init file for agent to join the cluster.
  • Create one machine (configurable using AGENT_COUNT_MACHINE) with 1 CPU (AGENT_CPU_MACHINE), 3G disk (AGENT_DISK_MACHINE) and 512M of memory (AGENT_MEMORY_MACHINE) using Ubuntu focal (IMAGE)
  • Wait for the nodes to be joined to the cluster
  • Optionally merge the generated kubeconfig with the existing $KUBECONFIG (MERGE_KUBECONFIG)

Quickstart Ubuntu 20.04 droplet

sudo snap install multipass
wget https://raw.githubusercontent.com/superseb/multipass-k3s/master/multipass-k3s.sh
bash multipass-k3s.sh
curl -Lo /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x /usr/local/bin/kubectl
kubectl --kubeconfig *-kubeconfig.yaml get nodes

Clean up

The files that are created are:

  • $NAME-agent-cloud-init.yaml
  • $NAME-cloud-init.yaml
  • $NAME-kubeconfig.yaml
  • $NAME-kubeconfig-orig.yaml
  • $NAME-kubeconfig-backup.yaml (if MERGE_KUBECONFIG is set)
  • $NAME-kubeconfig-merged.yaml (if MERGE_KUBECONFIG is set)

You can clean up the instances by running multipass delete k3s-server-$NAME-1 --purge and multipass delete k3s-agent-$NAME-{1,2,3} or (WARNING this deletes and purges all instances): multipass delete --all --purge

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].