Skip to content

digitalstudium/vmkube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vmkube

Create virtual machines backed Kubernetes clusters on your laptop with a single command.

One command to create clusters: sudo vmkube up
One command to destroy clusters: sudo vmkube down

Description

vmkube uses virt-install and talosctl under the hood. It creates virtual machines for control plane and worker nodes, sets up isolated networking, installs Talos Linux on each VM, bootstraps Kubernetes clusters, and provides kubeconfig for immediate access. When you're done, one command removes all VMs, networks, and disks.

It was tested on Linux, specifically debian-based distributions. It could work on other Linux distributions as well.

Quick start

Install dependencies

apt packages

sudo apt update
sudo apt install -y \
  qemu-kvm qemu-utils \
  libvirt-daemon-system libvirt-clients \
  virtinst \
  systemd-timesyncd \
  curl \
  docker.io

enable libvirtd

sudo systemctl enable --now libvirtd

talosctl

curl -sL https://talos.dev/install | sh

Install vmkube

curl -OL "https://raw.githubusercontent.com/digitalstudium/vmkube/refs/heads/main/vmkube" && sudo install ./vmkube /usr/local/bin/vmkube && rm -f ./vmkube

Create cconfig

vmkube initconfig

it will create ~/.config/vmkube.toml file with default configuration. Review and modify it if necessary.

Create clusters

sudo vmkube up

Access your cluster

After creation, access Kubernetes with:

export KUBECONFIG=~/.kube/vmkube
kubectl config get-contexts
kubectl config use-context admin@vmkube-1
kubectl get nodes

Destroy when finished

sudo vmkube down

PRs and issues are welcomed!

About

CLI tool for bootstrapping local k8s clusters backed by virtual machines

Resources

License

Stars

Watchers

Forks

Contributors

Languages