1 00:00:01,040 --> 00:00:04,820 We've now seen how to throw a pot onto our communities cluster. 2 00:00:04,830 --> 00:00:08,300 Now it turns out that we usually do not create pods in this style. 3 00:00:08,300 --> 00:00:12,110 I know that's kind of annoying to hear given that I just spent a couple of videos telling you about 4 00:00:12,110 --> 00:00:13,710 pods and how to work with them. 5 00:00:13,850 --> 00:00:14,270 Don't worry. 6 00:00:14,270 --> 00:00:17,060 We do work with pods and all the ways that I just showed you. 7 00:00:17,060 --> 00:00:20,790 So we ran out our very frequently run all the commands I showed you just a moment ago. 8 00:00:20,870 --> 00:00:24,580 We just don't usually create pods with this style of config file. 9 00:00:24,620 --> 00:00:25,850 Let me give you a little more clarity. 10 00:00:25,850 --> 00:00:27,170 Help you understand what's going on here. 11 00:00:28,120 --> 00:00:33,060 So in the world the Cuban eddies we have pods and those are intended to run some image or some contain 12 00:00:33,060 --> 00:00:38,260 a really inside them rather than creating these pods directly however we're usually going to create 13 00:00:38,320 --> 00:00:44,080 something called a deployment a deployment is a Cuban eddies object that is intended to manage a set 14 00:00:44,080 --> 00:00:45,250 of pods. 15 00:00:45,250 --> 00:00:50,830 So it might be just one single pod where it might be 10 different pods or 100 different pods each of 16 00:00:50,830 --> 00:00:53,360 these pods are going to be identical in nature. 17 00:00:53,440 --> 00:00:59,130 They will all be running the same configuration same container inside them the deployment has two big 18 00:00:59,130 --> 00:01:01,230 jobs assigned to it the deployment. 19 00:01:01,230 --> 00:01:06,240 First off is going to make sure that if any pod mysteriously just disappears for any reason. 20 00:01:06,240 --> 00:01:11,490 In other words if the pod crashes for any reason whatsoever then the deployment will automatically create 21 00:01:11,490 --> 00:01:13,050 that pod for us again. 22 00:01:13,230 --> 00:01:17,280 The deployments going to make sure that if we tell it make sure there are three pods available running 23 00:01:17,280 --> 00:01:19,780 this image deployments going to say absolutely. 24 00:01:19,800 --> 00:01:20,350 I got it. 25 00:01:20,370 --> 00:01:24,460 I'm going to make sure there are always exactly three pods running that image. 26 00:01:24,480 --> 00:01:31,070 That's the primary job of the deployment the deployment is also very useful for another reason as well. 27 00:01:31,080 --> 00:01:36,600 Second main reason is that well at some point in time you and I are going to decide to update the code 28 00:01:36,630 --> 00:01:38,250 inside of our different containers. 29 00:01:38,280 --> 00:01:43,650 In other words we might start off with all of our pods running a v1 of some applications we put together 30 00:01:44,220 --> 00:01:47,940 but then at some time we might tell the deployment that we want to roll out a new version but maybe 31 00:01:47,970 --> 00:01:52,690 the two the deployment is going to take care of this update for us automatically. 32 00:01:52,920 --> 00:01:59,750 Behind the scenes the deployment is going to create some number of new pods running this new version 33 00:01:59,780 --> 00:02:01,220 of our application. 34 00:02:01,430 --> 00:02:06,710 After these pods are up and running successfully the deployment is then going to start to manage that 35 00:02:06,710 --> 00:02:13,400 set of pods so it's going to say OK I'm now going to manage these three over here and I'll zoom out 36 00:02:13,400 --> 00:02:18,400 just you can see this whole diagram in a second and the deployment will start to sunset or essentially 37 00:02:18,400 --> 00:02:24,060 delete the old pods for us automatically so all these are then going to fade away once the new ones 38 00:02:24,090 --> 00:02:27,490 are up and running and then the deployments going to say OK. 39 00:02:27,510 --> 00:02:28,150 Fantastic. 40 00:02:28,170 --> 00:02:28,770 I've got it. 41 00:02:28,770 --> 00:02:30,360 I've done all this required work. 42 00:02:30,360 --> 00:02:34,210 I've got these three new pods running these updated versions for you. 43 00:02:34,620 --> 00:02:39,140 So we can really think of the deployment as just being a manager who manages a set of pods. 44 00:02:39,150 --> 00:02:44,680 That is what it is all about now understanding how to work with a deployment is pretty straightforward. 45 00:02:44,680 --> 00:02:47,830 Again it really just comes down to writing a config file. 46 00:02:47,890 --> 00:02:51,790 There are very few commands we need to understand around a deployment at most. 47 00:02:51,790 --> 00:02:55,630 The only thing that we're ever going to do with them is to list out the deployments we have and then 48 00:02:55,630 --> 00:03:00,450 tried to inspect their status deployments don't actually run any of our code or anything like that. 49 00:03:00,460 --> 00:03:05,800 So we're not really going to ever have to try to run some command in the context of deployment or really 50 00:03:05,800 --> 00:03:08,480 try to patch some logs from it or something like that. 51 00:03:08,500 --> 00:03:10,330 Instead we really just want to list them out. 52 00:03:10,330 --> 00:03:11,440 Take a look at their status. 53 00:03:11,440 --> 00:03:12,270 That's pretty much it. 54 00:03:13,430 --> 00:03:17,070 So it really just comes down to understanding how we write a config file for these. 55 00:03:17,150 --> 00:03:19,270 So then minds are going to take a quick pause right here. 56 00:03:19,370 --> 00:03:23,750 When come back the next video we're going to create a deployment by writing a config file and tell it 57 00:03:23,810 --> 00:03:26,810 to run our post application inside of a set of pots.