Skip to content
theJaxonPublic

About

Provision your local Kubeadm Kubernetes cluster with Vagrant and ansible. Just like Kontainer8 but for Mac M1/2/3/4

Topics

Resources

Stars

14 stars

Watchers

1 watching

Forks

Repository files navigation

MKube

Mkube VirtualBox Fedora

Provision your local Kubeadm Kubernetes cluster with Vagrant and ansible.

MKube is Just like Kontainer8 but for Mac with Apple silicon chip (M1/2/3/4).


Prerequisites


How to use

# Clone the repo
git clone https://github.com/theJaxon/MKube.git

cd MKube

# Start the machines 
vagrant up

# SSH into any of the machines 
vagrant ssh < controlplane | worker >
flowchart LR
    subgraph cp["controlplane node"]
        cpinfo["192.168.100.10<br/>2 vCPU · 2 GB RAM<br/>Control plane"]
    end
    subgraph wk["worker node"]
        wkinfo["192.168.100.11<br/>2 vCPU · 6 GB RAM · 40 GB disk<br/>Workloads"]
    end
    cp -->|"kubeadm join, API 6443"| wk

    style cp color:#eab308,font-weight:bold
    style wk color:#eab308,font-weight:bold
Loading

Optional: GitOps with Argo CD Core

Point MKube at a Git repo of Kubernetes manifests and it installs Argo CD Core (no UI, API server or passwords) and keeps the cluster synced to that repo. It's off by default and only installed when a repo URL is given:

# Branch is optional and defaults to main
MKUBE_ARGOCD_REPO_URL=https://github.com/<you>/<manifests>.git \
MKUBE_ARGOCD_REPO_BRANCH=main \
vagrant up

Manifests are read recursively from the repo root and synced automatically (prune + self-heal). Check status from the controlplane with kubectl -n argocd get applications.


Building and releasing the box

The box is built from theJaxon/Packer (Fedora/44) and released on this repo's GitHub Releases; each release (v<version>) holds the box and the Vagrant catalog, and the Vagrantfile reads the catalog from the latest release. The Packer build needs VirtualBox on Apple silicon, so it runs locally; linting and publishing go through Dagger.

export GITHUB_TOKEN=...   # Contents: read & write on this repo
make release              # lint → build → publish → bump → smoke-test

Rebuilding the same Kubernetes version replaces that release's box. To pick up a rebuilt box locally, remove the cached one first:

vagrant box remove the-jaxon/mkube --box-version 1.37.1 --provider virtualbox

Versions Used

  • Vagrant V2.4.9
  • Virtualbox 7.2.6
  • Kubeadm 1.37.1
  • Fedora 44

Helper Projects

  1. ContainerD - Container Runtime
  2. Cilium - Container Network Interface
  3. Traefik - Ingress Controller
  4. Local Path Provisioner Dynamic provisioning (Used as default storage class)
  5. Argo CD Core - Optional GitOps controller

References

  1. Oracle VirtualBox 7.2 introduces support for macOS on Apple Silicon and Microsoft Windows for Arm
  2. Kubernetes cluster with Kubeadm on Fedora
  3. chef/bento Packer Templates

About

Provision your local Kubeadm Kubernetes cluster with Vagrant and ansible. Just like Kontainer8 but for Mac M1/2/3/4

Topics

Resources

Stars

14 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages