Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creation of nodes in VMs by using Kubernetes kubeadm and minikube

Tags:

kubernetes

I am trying to create Kubernetes cluster with different number of nodes using same machine. Here I want to create separate VMs and need to create node in those VMs. I am currently exploring about kubeadm and minikube for these tasks.

When I am exploring I had the following confusions:

  1. I need to create 4 number of nodes each need to create in different VMs. Can I use kubeadm for these requirement?
  2. Also found that Minikube is using for creating the single node structure and also possible to use to creation of VMs. What is the difference between kubeadm and minikube ?
  3. If I want to create nodes in different VMs which tool should use along with installation of Kubernetes cluster master?
  4. If I am using VMs, then can I directly install VMware workstation / virtualbox in my Ubuntu 16.04 ?
  5. In AWS EC2, they already giving the Ubuntu as a virtual machine. So is possible to install VMware workstation on ubuntu? Since it is VMs on another VM.
like image 355
Jacob Avatar asked Apr 16 '18 05:04

Jacob


People also ask

What is difference between minikube and Kubeadm?

minikube and kubeadm Designed for learning, development and testing, minikube is a fast and simple solution for deploying a single node cluster. kubeadm builds a minimum viable, production-ready Kubernetes cluster that conforms to best practices.

What is the difference between minikube and Kubernetes?

Kubernetes is an open source orchestration system for Docker containers. It handles scheduling onto nodes in a compute cluster and actively manages workloads to ensure that their state matches the users declared intentions. On the other hand, minikube is detailed as "Local Kubernetes engine".


1 Answers

Kubeadm should be a good choice for you. It is quite easy to use by just following the documentation. Minikube would give you only single node Kubernetes. As of minikube 1.10.1, it is possible to use multi-node clusters.

  1. Kubeadm is a tool to get Kubernetes up and running on already existing machine. It will basically configure and start all required Kubernetes components (for minimum viable cluster). Kubeadm is the right tool to bootstrap the Kubernetes cluster on your virtual machines. But you need to prepare the machines your self (install OS + required software, networking, ...). kubeadm will not do it for you.
  2. Minikube is a tool which will allow you to start locally single node Kubernetes cluster. This is usually done in a VM - minikube supports VirtualBox KVM and others. It will start for you the virtual machine and take care of everything. But it will not do a 4 node cluster for you.
  3. Kubeadm takes care of both. You first setup the master and then use kubeadm on the worker nodes to join the master.
  4. When you use Kubeadm, it doesn't really care what do you use for the virtualization. You can choose whatever you want.
  5. Why do you want to run virtual machines on top of your EC2 machine? Why not just create more (perhaps smaller) EC2 machines for the cluster? You can use this as an inspiration: https://github.com/scholzj/terraform-aws-kubernetes. There are also some more advanced tools for setting up the whole cluster such as (for example) Kops.
like image 174
Jakub Avatar answered Oct 16 '22 06:10

Jakub