Kubernetes on Docker Desktop (Nginx Running on Pods)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi guys this is shobhit and in this video we will talk about kubernetes so as you already know that kubernetes is an open source tool for deployment and it provides an orchestration for containerization application so i will set up this into the docker and i'll show you how we can create pods and services also so first i'll show you what we can do so the very first thing you have to do is you have to install docker on your machine so since docker is already up and running on my machine so it's there you can see over here in the tray bar apart from that cube ctl is also you have to configure on your machine so cubectl and docker and after that you have to right click on this icon over here and go to the settings here in the settings we have kubernetes so we have to click on this enable kubernetes so make sure it should be enabled okay it's fine as of now another thing is we have context so here in the kubernetes you can see the context so for the docker desktop i am using this docker desktop context this is my some aws thing but i will not use this i'll use only docker desktop so make sure it would be selected on your machine okay so after that what i have to do i'll go into the powershell and there are some basic commands so that i can verify whether it's up and running or not so the command should be something like that for example in the kubernetes uh so the command will always start with cube ctl ctl get all so it will give me all the resources right so here you can see i have some output so it means cube cube ctl is working as well as the kubernetes is also working okay so what i have to do right now i will create some deployment and after that i will also create some service so here i have created a deployment.tml file so in this deployment.tml file this is something which i have so a few things i just want to give you so this is a deployment type as usual as you can see over here and the name should be ordered deployment whatever the name you want to give you can give and the labels labels is very important because services basically work on labels so i specify as an order label and the spec i specify as i want the replica and the match label should be order label okay so this is the order label it should match and the in the template you can see the template labels also the order label and in the inside the container the container name is order api and the image basically the nginx image i am using for this demo purpose and for the port basically it will use port number 80. so this is a deployment file which i have i also have a service dot eml file so straight forward file here you can see it's service type and the selector is basically the order label selector is important because here in deployment.tml i have used the same selector and it is on the type of load balancer and my port would be 8083 and it forwarded my request to port number 80. so this is service right so i have deployment i have services i'll not use name space file because i already have some name spaces inside this so i'll go over here and first what i have to do i will i'll show you few commands so if you want to see all the ports so the command is get cube ctl get pod so no so here you can see we don't have any part as of now so i'll create i'll set up deployment first so for the cube ctl deployment the command is cube ctl apply minus f and the file name so my file name is deployment.tml here you can see deployment has been created okay so once the deployment has been created you can see over here pod so now you can see the pods so here you can see the parts and the status is up and running okay since spots are there but i'm not able to access it because i don't have services as of now correct so for the services i need another command the ml file which i have created is services dot yeml here you can see services.ml does not exist so i need to rename i think it might be services.ml here you can see services created order services created now i need to look into what what all they have created right so for the command is get all so here we have parts we have services services of load balancer type and the external ip would be localhost sorry ipv is local host and the port is 8083 so here if you go to the browser and start this port 8083 so you can see engine x is there right so engine x is up and running so basically with the help of this board engine x is giving me a response so service is basically responsible for coordinating to the ports so that's all for the small demo if you have any question concern let me know i'll try to resolve your queries please subscribe my channel if you think it's worthy for you thank you so much for watching this video
Info
Channel: Shobhit Walia
Views: 151
Rating: 5 out of 5
Keywords: Kubernetes, Kubernetes on Docker Desktop, Kubernetes on local machine, Kubernetes running example, shobhit walia, shobhit, Kubectl, Kubernetes deployment demo, kubernetes deploy api
Id: dyaEzaDS7NQ
Channel Id: undefined
Length: 6min 47sec (407 seconds)
Published: Sat May 22 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.