Recommendation on how to set up kubernetes cluster mode by using kubeadm?

3/5/2021

Any recommendation on the reference guiding how to set kubernetes cluster by using kubeadm on two different machine(two laptops)?

I tried to google it, but a bit confused most of them using VM or VB not completely different laptop machine. (I am thinking of 1 laptop for Master and 1 laptop for Worker node)

-- 유지영
kubeadm
kubernetes

1 Answer

3/22/2021

Answering:

Any recommendation on the reference guiding how to set kubernetes cluster by using kubeadm on two different machine(two laptops)?

Yes. The place to start looking for the recommendations is the official documentation:

Citing the topics for an overview:

  • Before you begin
  • Verify the MAC address and product_uuid are unique for every node
  • Check network adapters
  • Letting iptables see bridged traffic
  • Check required ports
  • Installing runtime
  • Installing kubeadm, kubelet and kubectl
  • Configure cgroup driver used by kubelet on control-plane node

I'd reckon this links should help you:

You can also opt for a --dry run of kubeadm command to check if there are any warnings or potential issues with your setup (like for example not disabling swap):

  • $ kubeadm init --dry-run

As for the "two laptops" part. As said for bare metal solutions, you would need to reference the manufacturer documentation on support for Kubernetes compatible OSes (like Ubuntu, Debian, RedHat, etc.).


I tried to google it, but a bit confused most of them using VM or VB not completely different laptop machine. (I am thinking of 1 laptop for Master and 1 laptop for Worker node)

Personally speaking, I haven't seen much setups using laptops as bare metal machines that are running Kubernetes clusters. I've seen much more setups that are using:

  • minikube
  • Docker Desktop with Kubernetes
  • microk8s (there is a multi-node setup)
  • VM's with Kubernetes installed on them (Virtualbox VM and kubespray as a tool to install)

Additional resources:

-- Dawid Kruk
Source: StackOverflow