How to Create a Kubernetes Cluster in Azure? | Kubernetes tutorial for beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome to my channel and in this video I will show you how to create kubernetes cluster in azure so before we proceed let's first understand what is kubernetes a kubernetes is also known as K8 is open source system for automating a deployment scaling and management of containerized application kubernetes is developed by Google and now it's managed by clcf kubernetes is a way to run your containerize application in a consistent and reliable way across all the node the key benefits of the kubernetes it's allow a developer to focus on writing the code while infrastructure is by default handled by kubernetes you can scale up and scale down the application based on your demand kubernetes has a concept called cluster and a cluster is a set of node where you can deploy your application node can be either physical or virtual a cluster can have a one or multiple node kubernetes also provide some key benefit to manage your application the first benefit is deployment control for ruling out and rolling back the application the second one is service Discovery and load balancing for exposing application to the outside world the third one is storage orchestration for store your data fourth one is a self-healing for automatically replacing and rescheduling failed containers so now let's understand the kubernetes architecture kubernetes architecture is similar like a master working or architecture where Mass masternode responsibility for managing the desired state of kubernetes and make sure that all the components associate with the master node is run as entered now let's understand the first component of masternode called hcd database hcd database is a key value stored to maintaining the state of your kubernetes cluster and the configuration the second one is a control manager as a name suggest for managing a various control that handle things like replication self healing storage orchestration distributed controller the API server for exposing the kubernetes API and interact with the SCD database and the fourth one is a scheduler as a name suggests whenever you create or scalar application the scheduler responsibility to determine what node can run the workload and state of them in the worker node the key components are cubelet Q proxy and container runtime the cubelet for communicating the API server and managing the life cycle of pod the container runtime for pulling and starting the container on the Node and the Q proxy for implementing the service networking model now I have a dedicated video for each and every component now let's understand about the Noor pool so nude pool is a set of virtual machine with the same configuration so now whenever you create a kubernetes cluster in Azure by default AKs create a system node pool having a critical component like code DNS metric server tunnel font and OMS agent and user node pool is optional it is created by you where you can deploy your application [Music] so in the demo section we are going to create kubernetes cluster in azure so so for that first open the portal.azure.com and click the kubernetes services or you can search here kubernetes services and click on create kubernetes cluster after that give the resource Group so here I will create a resource Group name a case demo choose the cluster present configuration so it's a demo purpose so I will go with the Dave and test give the kubernetes cluster name so I give the name AKs demo select the region so I will go with the southeast Asia and the kubernetes version I will go with the 1.23.8 API server ability I go with the 99.5 percent uh in the real time scenario for the production you can go with the 99.9 percent um Auto upgrade so I am going to disable the auto upgrade node size I am going to select here the cheapest node size because it's a demo purpose and here the scale method so you can configure Auto scale but here I will go with the manual with the one node count click on the next so now in the presentation we see whenever you create a kubernetes cluster AK is by default Creator system node pool and in the system nude pool we have a critical component called Cod DNS metric server tunnel front and OMS agent so let me first add one more node pool and I am going to add the user note pool and this node pool we can use for deploy our application is nothing but is a set of virtual machine so in the background it will create a virtual machine for us and the OS type will be the Linux let me choose the node size so again I will go with the cheap paste option so let me select this and here I will go with the manual and I will add only one node count okay and I'm not going to change this default configuration I will go to the next next next review and create and click on the create button so this is the easiest way to create a kubernetes cluster in azure so there are multiple way to create a kubernetes cluster in Azure you can use Arn template you can use Powershell you can create using terraform but first I will show you the easiest method to create a kubernetes cluster so now the deployment is in progress let's wait okay now deployment is completed click on go to Resource and here you are inside the kubernetes cluster so in usual this is a manage kubernetes cluster it means that this control plane or this master node is managed by the azure and you have to just design your worker node by default kubernetes will not charge any rupee to having a master node whenever you create a worker node you are going to be charged so now let's uh connect this AKs server in our local machine so click on connect click copy the First Command and open the terminal foreign let me select the Ubuntu and paste it okay now let me copy the second command [Music] okay now my Cube cluster configuration are stored in this Cube file okay now let let me start with the first Cube curtail command so first command to check your config so Cube CTL config View so using this command you can see your configuration file so here you can see our a cash demo user is this current context is this now our AKs cluster is configured in my local machine now let's quickly check so Cube CTL get nodes so we have created the two nodes the first one is the Asian pool or you can say system node pool which is created by the AKs cluster by default and the second one is a user project that we have created during our demo section now let's check the cube CTL so here Cube CTL get pods minus minus all the namespaces so this command will return all the pods running inside our kubernetes kubernetes now here you can see as we discussed during the presentations this agent Cube proxy Matrix servers core DNS these are the core components are stored inside this agent pool here you can see okay so here I am using one software called lens which will give you the GUI of our kubernetes cluster so let me open the lens software so by default it will fetch the data from our config file let me select our kubernetes cluster and let me connect cluster now here you can see here you can see we have a two nodes one is Agent pool second one is a user user project and inside this workload this is a kubernetes objects so first one is a pod second is deployment third one is demonstrate fourth one is a stateful set replication States jobs current jobs now I have a dedicated video to give you the complete detail about this now let's first go to the pods let me select all the namespaces and here you can see core DNS Azure disk file kubernetes connectivity agent Cube proxy for managing the networking metric servers so this all the components by default store in the Asian pool now in the next video we are going to deploy the application inside this kubernetes cluster as well as we are going to understand this kubernetes objects thank you very much see you in the next video
Info
Channel: Nirav Gandhi
Views: 43,830
Rating: undefined out of 5
Keywords: kubernetes tutorial for beginners, create cluster in kubernetes, How to Create a Kubernetes Cluster in Azure?, Nirav Gandhi, microsoft azure, kubernetes azure, kubernetes in azure, kubernetes azure tutorial, azure container service, aks azure kubernetes, kubernetes ingress, azure kubernetes service, aks azure
Id: YlR9AkDJMMA
Channel Id: undefined
Length: 13min 8sec (788 seconds)
Published: Thu Jan 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.