What is Kubernetes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so you've heard of kubernetes but you don't know what it is or you've been playing with docker in containers and you want to know how to take it to the next level today we're gonna take a look at what kubernetes is and see when and where we might want to use it so stay tuned so what is kubernetes before we get into exactly what kubernetes is let's talk about when you might want to use it you're in the situation where you've been using docker for a little while or you at least know what docker is and maybe you have it deployed on a few different servers and this is great and we've used docker compose in the past to actually go through and manage these kind of deployments and they're pretty simple for something that's really small but say your website or application makes it onto a big news source and drives a lot of traffic your way and you need to scale up really fast how are you going to go from the three servers that you have now to you know 40 servers 50 servers how are you going to go past the handful of servers that you can keep track of in your mind when you really need to scale after business in this situation where would you have possibly put a specific container if you need to work with it or how are you deciding what containers go where this is where kubernetes comes in and kubernetes is a platform for working with containers not specifically docker actually just containers in general you can use alternatives to docker to manage the containers also but kubernetes gives you a few key things that we're going to talk about it gives you more that's gonna under the hood it's a platform you can build on it and extend it but at its core what kubernetes gives you is a means to do deployments an easy way to scale and it gives you monitoring let's take a look at how we actually do this with kubernetes so in kubernetes you have a master node so this is the coop Earnest kubernetes master and this is part of a cluster so it knows of other servers that you create that you can then deploy containers to the actual process of deployment is pretty simple too so and this way you talk to kubernetes you tell it what kind of image you would like to create a container from and you give it some other criteria and it creates what's called a deployment so that would be your apple in this case and your deployment can say a bunch of different things you can specify I need a certain amount of CPU I need a certain amount of RAM I maybe need a specified amount of file storage all of these things are held inside of your deployment and kubernetes will keep track of that for you and when I say keep track of it it's not like when we do docker compose to do a deployment where we just push a container out to run a deployment is something that kind of keeps on going it has a deployment controller that in essence if your application goes down kubernetes is gonna know about it and it's gonna try to everything it can to auto heal so it'll spin another container up and recover for itself because the deployment is not just about that initial launching of the container it's something much bigger in kubernetes next let's talk about scaling so I mentioned before that you're getting more traffic than you're expecting and you need to scale out your application so the naive way to scale would be oh I'm gonna deploy one app container per server but that's not necessarily like useful and in a lot of cases right like sometimes you're going to be in a situation where that's not the most efficient use of your resources so this is what I would call naive scaling and this is the way like this is a good way to do it when you have a few application servers but if you want to keep costs down you can't just spin up a server every time you need to play a single container and less by chance you're spinning up a server that is exactly the right size for that so the way that scaling works in kubernetes is it'll figure out where to put it for you so scaling a deployment is done by modifying the deployment so the deployment like I said before can hold on to how many CPUs it needs how much RAM it needs it also can hold on to the scale so you can say I need to deploy five different nginx nodes you put them in the best spot given that they have these hardware requirements that might bring us to another situation of how well how am I going to connect to my particular container and that's where another thing inside of kubernetes called services comes into play so say nginx is one of our services we have multiple nodes that are running and we need to connect to those but we want to connect to them in a smart fashion so services let us manage all of these and then they also put a load balancer in front and give us public accessibility to this particular service we can have multiple services just we can have multiple deployments so what you'll see is that you know service a or our nginx maybe maybe we need two containers for that but our database service we only need one container to actually run it so we have those on two separate things and they might be on the same machine or kubernetes might decide to put them on separate machines it really depends on what your scheduler thinks is the best usage of your resources at the time and you can tweak that within kubernetes you can tell it to prioritize and even distribution or you can tell it to prioritize you like fully utilizing the resources on a single node you can write your own schedulers there's there's a lot you can do with this but at its core kubernetes is a platform for allowing you to actually maintain deploying containers into production once you get beyond a certain scale but it definitely works if you're you're not at scale if you don't have 50 servers that you're working with which are called nodes in kubernetes but even if you're not web-scale you can still benefit from kubernetes because it gives you the automated health checks it can give you rolling restarts and deployments so that you make sure that when you deploy a new application you're never cutting off anything that needed access to that service and I've seen extensions to kubernetes that allow you to do things like manage your let's encrypt free SSL Certificates automatically so you don't have to do it yourself every three months when you know it's going to be up so for the foreseeable future we're going to be going through kubernetes in our weekly tutorials and actually building out some some mock deployments and figuring out how to use each of these components I hope that you enjoyed this video leave a comment down below and let me know what you're excited to use kubernetes for if you could also give it a thumbs up and share it with your friends that would be sweet don't forget to check out the patreon page if you're getting some value out of coder journey you could really help me out and kind of growing the channel but more so than anything just have a great week
Info
Channel: CoderJourney
Views: 591,129
Rating: 4.9192076 out of 5
Keywords: tutorial, coderjourney, programming, kubernetes, docker, docker containers, devops, container deployment, open source, google, cloud, containers, software (industry)
Id: R-3dfURb2hA
Channel Id: undefined
Length: 6min 34sec (394 seconds)
Published: Tue Mar 07 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.