Table of Contents
- The Basic tools used for Kubernetes installation
- The basic layout structure of nodes presents in the Kubernetes structure
- Steps for the Kubernetes installation
- Creating a fresh EC2 instance
- Installing all the dependencies and provisions
- Install the KUBEADM
- Make the AMI of the instance
- Create another instance of EC2 with the same AMI and make them worker node
- Video Tutorial ( 2 videos )
1.Basic tools used for Kubernetes installation
Kubernetes is an open-source tool used for orchestration of the containerized application and there are three major tools used for the installation of Kubernetes. which are
kubeadm is using to create a master node in the Kubernetes and nodes
Automates the installation: The kubeadm has in the process of automating the installation Oftools in the Kubernetes
It also Automation the configuration of Kubernetes components. e.g.
- API Server
- Controller Manager
- Kube DNS
- Nodes are the collection of containers. So, the collections of containers comprised a node and there is a master node in Kubernetes which controls the other syllabi node on the structure
So, let us say there are three nodes present in a Kubernetes network then, one should be a master node it will be controlling Itself and the other tool is the syllabi node. So, the kubeadm is using to create a master node.
The Kubelet is used to manage processes happening on all the nodes.
And the kubectl tool is used to communicate the nodes with each other. So, the kubectl tools perform the function of communications between the nodes.
2. The basic layout structure of nodes presents in the Kubernetes structure
- Now talking about the basic layout structure of the nodes present in a Kubernetes structure. First is a master node and there are three-layer nodes present here. Node1, Node2, Node3. And all these the processes again on these notes managed by that tool.
- If we talking in detail about Node1. So, there is a weave operation going on in node1 as well as a proxy operation. which also going on node2 and node3. So, using the kubectl tool the masters able to communicate with node1, node 2, node3 simultaneously. and the master node must have all the functionalities of the other same nodes that are the reason the master node is having a proxy as well as v functionality.
3. Steps for the kubernetes installation
- Creating a fresh EC2 instance.
- Installing all the dependencies and provisions.
- Install KUBEADM.
- Make the AMI of the instance.
- Create another instance of EC2 with the same AMI and make them worker nodes.
- The command which will be using first is sudo su.
7. And using the get update command we will update the packages in the instances.
8. The third command which we will be using is app cat install -y apt-transport-https. It is used to out the traffic which is incoming on the instance of two different nodes.
9. Using the fourth command which we will be installed in the package Kubernetes package.
11. Now we have to define some Kubernetes lists. We again update all the packages present in the instance.
12. After that we will install docker.io, we will install that docker.io
13. Now using this command we will be installing the three major tools which are used in the structure of Kubernetes which are kubelet, kubeadm, kubectl.
4. Steps for Kubernetes installation
a. Creating a fresh EC2 instance
This is our Kubernetes here we specify the volume of the image that we want to use so it would be 30 GB and the image name could be a slave so let’s click on create an image.
As you go on AMI you can see that the image is being created.
- In the AMI word, we can create the token on which we will be able to connect the slave nodes to the master node so for generating the token in the previous lecture we have covered some parts and we will initiate the cube idiom.
- But before that we the AMI should be working properly now from here we will launch the instance
Tato micro sufficient for that so here we will choose two.
The default will use the default security group settings here we have already saved.
A key pair so we will use that you so we can check the status of the two instances being launched in the ec2 instances dashboard. We can name them as we want so we will be naming them slave one and slave two.
- This comment will create the token by using that we can easily connect our slave nodes to the master node.
- The token creation can take up to one minute so you have to be patient for that till main while we can connect to the slave node.
The new slave node which we have created using the image of the master instance we will simply paste the path of the KPA file which is the PEM file and along with that, we will pass the path of the slave instance.
So we have to replace route and type in ubuntu here so as we have successfully launched and successfully log in to a slave node nowhere in the master node we have successfully created the token now we will paste this token here now we will able to connect this slave node to the master node.
We will be using the following command to make a directory in the master node so let’s copy the command and the command will give the permissions to the home directory and now using the command we can check the status of the node.
mkdir -pp $HOME/.kube
We will successfully connect the new slave node to the master node.
we are checking whether we have got the node or not so as you can see the master node is ready and we have just added another snap node to the scoober native structure which was added 20 seconds 37 seconds ago so depending on the size of the node it may take up to 1 to 2 minutes for the node to get ready.