GKE Autopilot - Fully Managed Kubernetes Service From Google

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

I fucking love this dude

πŸ‘οΈŽ︎ 8 πŸ‘€οΈŽ︎ u/CMDR_Shazbot πŸ“…οΈŽ︎ Mar 09 2021 πŸ—«︎ replies

basically fargate but more coverage yeah?

πŸ‘οΈŽ︎ 5 πŸ‘€οΈŽ︎ u/Itom1IlI1IlI1IlI πŸ“…οΈŽ︎ Mar 09 2021 πŸ—«︎ replies

Hey victor!

Does autopilot support preemptible nodes?

πŸ‘οΈŽ︎ 3 πŸ‘€οΈŽ︎ u/patrickleet πŸ“…οΈŽ︎ Mar 09 2021 πŸ—«︎ replies

My job is basically installation consultant for Openshift. It seems to be getting easier to run Kubernetes, which I think is great.

Custom configurations will always be a pain, I imagine.

πŸ‘οΈŽ︎ 3 πŸ‘€οΈŽ︎ u/BassSounds πŸ“…οΈŽ︎ Mar 09 2021 πŸ—«︎ replies

There is no option to choose note types or sizes. You pay for what your pods consume and it is up to Google to figure out what are appropriate nodes for each of the pods.

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/vfarcic πŸ“…οΈŽ︎ Mar 09 2021 πŸ—«︎ replies
Captions
so what is gk autopilot absolutely awesome it is the only service of that kind as far as i know nobody else does that [Applause] you already have a kubernetes cluster or you're planning to have a kubernetes cluster and one of the questions you might be asking yourself what is the level of control i want to have on top of that kubernetes cluster do i want to install it from scratch do i want to use one of the existing kubernetes platforms or distributions do i want to let somebody else manage my kubernetes cluster and if i do what is the level of control i will give to somebody else and what is the level i want to retain to myself so those are the questions you might be asking and it all boils down to a simple one what is the level of control you should have of your kubernetes clusters do you want full control meaning that you control absolutely everything then you start from scratch you create your own virtual machines or bare metal servers you install the os even better you compile the os yourself install it on top of all the nodes control plane and worker nodes you use cube adm to install some of the things you need and then on top of that you install some other things and you join them together into a coherent group and you start calling it a cluster and then you go for the second the third the fourth one and you do it all by yourself that is silly that is so silly that there is a group of people tiny group of people mini-school group of people who really really know what they're doing and they're doing all those things and there is a much bigger group of people who think that they know what they're doing but they don't and then they run into trouble because doing everything you need to do from scratch without any additional tools without any platform without using services from others is hard and it requires a very deep knowledge into many many different things what is the alternative to that you can use an existing kubernetes platform like rancher or openshift or what's not many of them and then you do more or less the same as in the previous case but some of the things are simplified because those platforms come already with the tools you need opinionated and what's not but that is also silly unless you have to be on-prem if you have to be on-prem then there's not much you can do beyond choosing something like rancher openshift and suffering a lot in the process a much better option is to have a managed kubernetes cluster you can choose aw cks azure aks google gk alibaba something lino the digital ocean they all have managed kubernetes clusters but the problem is that they are not really fully managed none of them is really managed completely if you're lucky you get managed control plane if you're a bit luckier you get some semblance of managed nodes but still you need to manage that stuff one way or another maybe not the control plane that's a non more or less but working notes hey that's your job you need to manage it yourself cloud providers like azure ws alibaba what else google what so on and so forth will not manage everything there is to be managed you still need to figure out what will be the size of your nodes what will be the operating system potentially sometimes uh how it will scale what is the minimum number of replicas maximum number of replicas and so on and so forth you need to do a lot of stuff much less than if you install it completely by yourself but still a lot of things and there is a big chance that you're going to mess it up it happens it's almost unavoidable because there are very few teams in a world who have really really really deep experience how to do that stuff and you can gain that experience as well everybody can learn everything there is to be learned about something but why would you unfortunately there is no cloud provider that gives you fully managed kubernetes cluster actually that is not true since the end of february beginning of march 2021 there is one provider that gives you fully managed kubernetes cluster no exception everything fully fully fully managed by somebody else all you would have to do is run your applications and that somebody is google and the offering is called gke autopilot or google kubernetes engine out of pilot so what is gk autopilot one way to describe it would be that gk autopilot is a fully managed kubernetes service based on best practices and battle hardened by google sres and those guys know what they're doing they're not the only guys who know what they're doing but they know what they're doing and they roughed their best practices they wrapped their experience in managing kubernetes into a service that you can use but you cannot do anything you want in such a cluster which i will show you soon it is restricted there are certain rules that need to be followed and there are certain restrictions for example external ip services are blocked cabinet row is disabled cost path volumes are not allowed unless it is slash bar slash logs and only read mode there is no ability to run privileged pods and there are many many other things that you cannot do because you shouldn't now you might be saying hey i do not know what those things are great then brilliant there is no problem for you because if you don't know what they are you're probably not even using them and if you know what they are really then you probably know that you shouldn't be using the things that are not allowed i mean the full list you can go to the site to see but there are certain restrictions in there for good like hey you cannot do privileged mode of course you cannot do privilege mode you shouldn't be able to do privilege mode and now without a pilot that is not allowed brilliant right that's implementation of best practices we are not allowed anymore to do things that we shouldn't be doing in the first place that was enough of an intro i will comment on quite a few other features related to autopilot through a hands-on demos so let's explore gk how to pilot in 20 minutes or less and for that i will need to start by creating a completely new cluster here we are this is google cloud console and i will use it to demonstrate how autopilot works normally i would script everything or run it through cli or maybe terraform or something like that but i believe that since this is so new it will be easier to understand what's going on through the console so i will go to kubernetes engine and i will do the normal stuff like hey let me create a new cluster but before i do that i need to enable the api so fast forwarding there we are the api is enabled and now i can really create the cluster so let's click the create button and this is a new thing right until recently we could only create a standard cluster we were not even asked which type of cluster we want to create and now we have the option to create uh autopilot cluster so let's click the configure button and let's see what we'll get what are the options what can we specify okay so we can select the region cool uh we can name the cluster let me name it gk auto pilot demo you probably noticed something curious there is almost nothing we can specify there are a few networking options nothing really fancy few advanced options again not much over there and what is definitely missing here the big thing is that we cannot specify the nodes i cannot set how many nodes i have whether it will auto scale or not what will be the size of the nodes uh or operating system none of those things essentially we can only say hey i want a cluster that is going to be called like this and uh i want it to be in this region so region and the name is all we can set there are a few other options but basically only the region is what matters and the only thing we can do with such a small number of options is click the create button and now in fast forwarding again it will take probably five to six minutes until it's up and running so while waiting it is important that i repeat this one more time the standard gk cluster manages the control plane and v manage the nodes now of course google helps us in managing those nodes but it is still our responsibility to choose how many nodes we want whether they will scale automatically or not what is the size and what's or not with the autopilot we just say hey i want a cluster i don't care about nodes that's not my problem and the pricing model is in line with that we will be paying only for the resources that our pods consume whether google will create one node thousand nodes how big they will be and all those things are irrelevant we pay only for the resources our pods are consuming and that's awesome that means that is a true container as a service or at least a variation of containers as a service it's not even kubernetes anymore we are just specifying where we want our pods to run and will pay for the pods that are running what will be the infrastructure below all that is google's problem whether it will create large nodes big nodes whether it will waste resources or not again google's problem our problem is to create pods to specify what we want to run and uh run those things without really thinking about the cluster and we can see that by examining the sla while waiting for those things to happen for my cluster to be created so here is the sla look at this if it is a zonal cluster we get 99.5 percent availability guaranteed availability for the control plane only for the control plane what happens with the nodes is not part of the sla same thing for the original cluster slightly higher uh uptime guaranteed up time 99.95 but only for the control plane now when we move into the autopilot we get 99.95 percent uptime guaranteed for the control plane but this this is a new thing this is awesome autopilot pods in multiple zones so as long as we run our pods in a regional cluster across multiple zones we get 99.9 uptime guarantee sla for our pods it's not anymore sla for the cluster it's for the pods google guarantees that our pods will be running of course that does not apply to bugs of your applications if your processes are not working correctly and what's or not but if everything is okay on your side google guarantees 99.9 uptime sla for our pods nobody as far as i know nobody else does that nobody else has that type of sla that they guarantee our apps are running not the control plane not some underlying infrastructure our applications odds and parts are our applications now we can go into details of what else we have in sla it's a long document read it i will provide the link in the list uh and in the description so go to the description you will find the gist with the commands that i will run later and all the links you need now let's go back to the cluster see whether it is up and running it's not so fast forwarding to the end of the process there we are the cluster was created so let's go inside and there is not much to see right the if you're familiar with gk you probably know that there is a tab saying nodes no we cannot see the nodes we can only see that nodes might be running in one of those zones which are zones of the region that we selected and that's about it there is uh there is no way to specify the nodes and many of the options that you traditionally have are locked because google now guarantees that things are running for us so let me connect to a cluster i will go to the connect button and i will copy this command and that command will create cube config so let's see what we're what we'll get so we'll export cube config variable to be the current directory wherever i am right now cube config dot yaml and i will execute the command that will create my kubernetes config there we are right now i can deploy an application for example and by doing cut k tests and dot channel this is the simplest application i want to see what is going on now how does the application behave so i'm going with something fairly simple and that is a single deployment there we are single deployment uh based on an existing image now the important part here is that i'm specifying limits cpu and memory and resources requested resources also cpu and memory and below that i'm specifying horizontal pad auto scaler that will scale my deployment scale the number of pods of the deployment based on average utilization of memory whenever memory reaches 25 it will scale up i specified it because this application that i will deploy uh will be increasing the usage of memory so i created a small demo up that will be increasing memory utilization that way i can simulate what happens with the up from the scaling perspective and hpa will scale it whenever memory utilization reaches 25 so i want to force that scaling functionality that is baked in and see what's happening what's happening with nodes and what's or not so let's apply this cube cattle apply dark dash file name key test.yaml and go i said go there we are let's watch what's happening by executing cube cattle uh get pods and nodes and we can see that there are two pods already because that's the minimum for my hpa they're about to be created and we can see that google created two nodes in that cluster generally speaking even though that's not hard rule that cannot be avoided but more often than not google will create one node for each pod there might be an extra node for some system level resources what's or not but that does not matter because we do not really care about the number of nodes here it's google's responsibility to create nodes and cr and destroy nodes so we have two that are uh doing some random stuff not really important and two that are being created right now and why are we getting two nodes simply because there are two pods that should be running so google is creating one node for each pod and the size of that node will be appropriate for the specified amount of resources or if there are no resources specified it will try to figure it out by default gk will assume that your pod is using half a cpu and two gigabytes of memory by default now if we specify resources ourselves then it will use that information to figure out uh how it should run stuff and where it should run and what's not anyways we have two pods running and four nodes two nodes doing some random stuff we don't care because we are not paying for that stuff we are paying only for our pods and two nodes because there are two pods two replicas of the deployment now the memory usage of that application in those pods is increasing over time i designed the app to do that to basically simulate memory leaks and soon it will scale up so let me fast forward a bit until it scales up and see what's going on [Music] there we are uh memory usage increased over 25 because that's what i specified in hpa in horizontal pod autoscaler and the hpa scaled the application to three replicas and now it's killed it to four replicas uh it is as i said before it is simulating memory leaks and two of those are pending and soon you will see google will react it will create new nodes to host those additional pods so it will scale up [Music] now it's scaled even more we can see that now it's scaled to six replicas that's the maximum number of replicas i allow in uh horizontal powder scalar and we got the new node the first new node and now yet another node is being created to accommodate the need to have more replicas and it keeps following the pattern of having one node for every pod and so on and so forth it will create the fifth and the sixth and the seventh and the eighth node and then it will scale down if the number of pods drops and so on and so forth it will do whatever needs to be done and we do not care about any of those things the only thing we should care about is to define our applications and run them in kubernetes and google is taking full responsibility for everything related to infrastructure and kubernetes itself and making sure that our pods are almost always running right they might be in a pending state for a few seconds and when it scales up until uh notes are created if there is a need to create nodes but outside that it's all google's responsibility and we can focus only on deploying our applications and that is absolutely awesome actually let's go back to the big screen my head in in full full glory and talk about this what do i think about this what's going on well what is this new service we could have a long debate where we would argue whether google cloud is better or worse than aws or azure which one is better which one better suits your needs and so on and so forth but when kubernetes is concerned it's almost undisputable that gke the standard one the normal one the one that existed for years now is the best kubernetes service there is in the market google nailed kubernetes and now with autopilot there is absolutely no discussion anymore google is ahead of everyone when kubernetes is concerned now kubernetes is not everything everybody uses so that does not mean in any form of way that google is better or worse than aws or azure in general terms but autopilot proves that there is no better place to run kubernetes than in google cloud if you want more control use gk standard if you want the fully managed kubernetes as a service solution use autopilot if all you need is kubernetes there is no doubt google nails it google is ahead of everyone by a big margin when kubernetes is concerned with gk autopilot entering the market and being just released as i said before february or march 2021 we have an option to stop worrying about our clustering focus on what matters and that's our applications if we do not want to think about how we deploy our applications we can use google cloud run hey if you're not familiar with google cloud run there is a video above my head but if you do want to have control but control over our applications and not everything else if we do not care about infrastructure if we want somebody else to make sure that everything is up and running and we focus on how we define and deploy our applications gk autopilot is arguably the best solution we can have today actually it is the only fully managed kubernetes offer that we have at least as far as i know other providers are getting there they are partly managed not managed at all they give you different levels of control but nobody gives you a fully managed kubernetes cluster except google with gke autopilot now i understand that for some of you having more control over your cluster selecting the things like the size of the nodes and the way how it scales might be important but for majority of us it's not for the majority of us we want to focus on our applications and let somebody else manage everything else and that something is autopilot and it's not that it is the best service of that kind because it is but it is the only service of that kind nobody else gives you such fully managed kubernetes service there is not much more to say about it except go and try it out now truth be told google just released this or maybe it didn't depends on when you watch this video but if you're watching this video in let's say first half of 2021 uh then you can say hey google just released this maybe it's not as good as stable as it should be maybe we need a bit more time that would be a valid argument from what i've seen it works like a charm but then again i didn't go through all the possible use cases uh somebody might have try it out right away don't wait to try it out if you can run things in google cloud if you cannot then i'm sorry but if you have gcp account try it out right away and then make a decision whether to use it immediately wait for a while or not at all but in the worst case scenario everybody should write out autopilot is in my opinion the best way to run our applications in kubernetes without worrying about kubernetes much unless we have special requirements special needs now i know that many of you will say hey i have a special need we all think that we are special but in reality there is a very small percentage of companies who have those really special needs and just don't tell me that your special need is to run privileged pods or something like that because that's not special that's silly anyways try it out please let me know in the comments what you think also keep suggesting what i should explore this video came as one of the suggestions the video coming after this one is also based on your suggestions as long as you keep suggesting what i should explore i will keep exploring the things you suggested see you next time and hey remember hit the bell icon subscribe turn on the notification do all the stuff that you do especially like it like it like it now goodbye see you next time cheers
Info
Channel: DevOps Toolkit
Views: 3,755
Rating: 4.9344263 out of 5
Keywords: gke autopilot, gke, gcp, google cloud, google kubernetes engine, autopilot, kubernetes, k8s, kubernetes service, managed kubernetes, fully managed kubernetes, google cloud platform, managed kubernetes comparison, gke autopilot mode, devops, devops toolkit, viktor farcic
Id: Zztufl4mFQ4
Channel Id: undefined
Length: 24min 3sec (1443 seconds)
Published: Tue Mar 09 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.