Kubernetes Setup Notes
Kubernetes Setup Notes
===========================================
=================
1)Mini cube
2)MicroK8s
3)kubeadm
Admin tool use to bootstrap and manage production grade kubernetes cluster.
In cloud env:
=============
GCP
AWS
MA
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.
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/
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.
chmod +x ./kubectl
Before installing Minibute make sure that virtualization is enabled in your laptop.
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.
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:
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:
To check whether /usr/local/bin was set to path or not execute below cmd:
ls –ld /usr/local/bin
result
MiniKube can work with different virtualization tools and that’s where you must specify what driver
to use.
CMD:
To enable virtualization in windows 10 virtual box then execute below command in virtual box
installation folder
Cannot enable nested VT-x/AMD-V without nested-paging and unresricted guest execution!
(VERR_CPUM_INVALID_HWVIRT_CONFIG).