Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Building Multi-Node K8s cluster with CRI-containerd & Moby Made Easy
#!/bin/bash
# Cloning the LinuxKit Repository
git clone https://github.com/linuxkit/linuxkit
cd linuxkit/
# Building Moby & LinuxKit Tool
make
# Copying the tools into the right PATH
cp -rf bin/moby /usr/local/bin/
cp -rf bin/linuxkit /usr/local/bin
# Peeping into Kubernetes Project
cd projects/kubernetes/
# Build minimal and immutable Kubernetes OS images
make build-vm-images KUBE_RUNTIME=cri-containerd
# Boot Kubernetes master OS image using qemu.
# By default linuxkit run uses user mode networking which does not support access from the host. To workaround this you can use port forwarding e.g.
KUBE_RUN_ARGS="-publish 2222:22" ./boot.sh
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p 2222 root@localhost
KUBE_RUN_ARGS="-publish 2222:22" ./boot.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment