You are on page 1of 5

There are lots of ways to setup kunernetes:

===========================================

some of the are:

=================

We can set up locally on our laptop or vm machines using solution like

1)Mini cube

2)MicroK8s

3)kubeadm

Admin tool use to bootstrap and manage production grade kubernetes cluster.

In cloud env:

=============

GCP

AWS

MA

We can access kubernetes directly through browser in KodeKcloud.com

MiniCube:

Earlier we talked about the different components of kuberenets is that make up a master and
worker nodes as below.
It will take a lot of time and efforts to set up and install all of these various on different sytems
individually by ourselves.

Mini cube bundles all these different components into a single image providing as a pre configured
single node kubernetes cluster.

The whole bundle is packaged into an ISO image and is available online for download.

We don’t have to downalod ISO image, Minicube provides an executable command line utility that
will automatically download the ISO and deploy it in virtualization platform such as Oracle etc.

You must have a hyperviser installed on your system.

For windows you could use virtual box or hyper v and for linux you could use virtual box and VM and
finally to interact with kubernetes cluster you must have kubernetes command line tool also
installed on your machine.
We need three things;

1)Hypervisor

2)Kubectl uitility

3)kube executable

Goto: https://kubernetes.io/docs/tasks/tools/

Norte: before installing MiniKube, we must install Kubectl utility.

Kubectl tool is what we will use to manage our coordinate its resources and cluster after it is set up
using MiniKube.

Installing the Kubectl utility before installing MiniKube will allow MiniKube to configure the Kubectl
utility to work with the cluster when it provision it.

Kubectl utility can work with multiple cluster, local or remote clusters at the same time, there is
small configuration for it.

Minikube is automatically take care of that when it provisions a kubernetes cluster, but that is if you
already have the Kubectl Utility installed.

Our goal is to set up a cluster on our local machine.

Cmd to install Kubectl in linux:

curl -LO "https://dl.k8s.io/release/$(curl -L -s


https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"

Make the kubectl binary executable

chmod +x ./kubectl

Move the binary into your PATH:

sudo mv ./kubectl /usr/local/bin/kubectl

Now install MiniKube:

Before installing Minibute make sure that virtualization is enabled in your laptop.

To check virtualization is enable in linux execute below command:

grep -E --color ‘vmx|svm’ /proc/cpuinfo


Install a Hypervisor:
================

We will go with virtual box has that is our preferred virtualization solution.

You can also run Minikube without a hypervisor and directly on you host using Docker .

If you already have Docker installed, you could leverage that and have Minikube and provision a
kubernetes cluster using a docker container.

Howeever, note that as you can see here in the documentation page, there is warning that says it
can result in security or data loss issues.

So we will just stick with a VM.

I just prefer virtual box because in case you mess up something on your system and you need to
restart. Its easy to get rid of the VM and restart again.

Next step:

Install VM from https://www.virtualbox.org/wiki/Downloads.

Install VM appropriate it your OS version.

After VM installation completed, when we provision a cluster using MiniKube, it will automatically
create a VM as required. So apart from just installing VM, you don’t really have to do anything
directly with it.

Next step:

Install MiniKube utility using below cmd.

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

sudo install minikube-linux-amd64 /usr/local/bin/minikube

As /usr/local/bin was set to PATH. So we didn’t need to do that again.

To check whether /usr/local/bin was set to path or not execute below cmd:

ls –ld /usr/local/bin

result

rwxr-xr-x 2 root root 4096 Feb 22 22:52 /usr/local/bin

MiniKube can work with different virtualization tools and that’s where you must specify what driver
to use.

In our case we use virtual box.


Cmd to start minikube:

minikube start --driver=<driver_name>

minikube start --driver=virtualbox

CMD:

minikube start --driver=<driver_name>

minikube start --driver=virtualbox

To enable virtualization in windows 10 virtual box then execute below command in virtual box
installation folder

VBoxManage modifyvm YourVirtualBoxName --nested-hw-virt on

VBoxManage modifyvm Ubuntu --nested-hw-virt on

To solve issue occurs in windows virtual box like below

Cannot enable nested VT-x/AMD-V without nested-paging and unresricted guest execution!
(VERR_CPUM_INVALID_HWVIRT_CONFIG).

Then execute below command in cmd promp in admin mode:

bcdedit /set hypervisorlaunchtype off


disable hyper-v in settings  windows features turn on and off  uncheck hyper-v  ok  restart
system

You might also like