1 00:00:00,990 --> 00:00:02,420 We've now created a deployment. 2 00:00:02,430 --> 00:00:06,510 So now we're going to take a look at a couple of commands we can use to inspect that deployment and 3 00:00:06,510 --> 00:00:08,510 manipulate it in some fashion. 4 00:00:08,520 --> 00:00:13,170 The first command we're going to take a look at is QCT l get deployments that's going to list out all 5 00:00:13,170 --> 00:00:19,870 the running deployments we have on our cluster so I'll do a cube Seitel it deployments and we'll see 6 00:00:19,870 --> 00:00:27,100 that we have one deployment called Post dash double on here is a ready number up to date and available 7 00:00:27,700 --> 00:00:30,730 ready is the number of pods that we are trying to create. 8 00:00:30,730 --> 00:00:35,290 That's the number on the right of the little slash right there and then on the left hand side is the 9 00:00:35,290 --> 00:00:39,190 number of pods that are up and running and ready to receive some traffic or do some work. 10 00:00:40,230 --> 00:00:44,850 We've also got the number of up to date pods because remember we use deployments to manage updating 11 00:00:44,880 --> 00:00:50,100 the versions of some code or application running inside these pods and then the number of pods that 12 00:00:50,100 --> 00:00:54,780 are available and again ready to do some work for us. 13 00:00:54,960 --> 00:00:59,220 Of course we can also now print out the pods we have running inside of our cluster as well we should 14 00:00:59,220 --> 00:01:05,960 see one pod that has been created automatically by this deployment so we can do a cube CDL get pods. 15 00:01:06,300 --> 00:01:09,870 And right there is the pod that was created by our deployment. 16 00:01:10,050 --> 00:01:15,030 And very interestingly if you and I tried to delete this pod that was created by the deployment the 17 00:01:15,030 --> 00:01:19,470 deployment is going to see that that pod has mysteriously disappeared and so it's going to attempt to 18 00:01:19,530 --> 00:01:21,220 recreate the pod for us. 19 00:01:21,450 --> 00:01:23,400 Let's try doing that right now. 20 00:01:23,400 --> 00:01:30,310 I'm going to delete that pod that was created by the deployment with a cube Seitel delete Khaled and 21 00:01:30,310 --> 00:01:31,730 then I'll put in the name of the pod. 22 00:01:31,750 --> 00:01:35,090 I'm going to copy paste that name right there. 23 00:01:35,160 --> 00:01:37,380 Remember the first poster right there just as a reminder. 24 00:01:37,410 --> 00:01:41,310 That is the pod that we created in the last couple of videos and we were working with pods initially 25 00:01:42,470 --> 00:01:42,690 all right. 26 00:01:42,700 --> 00:01:50,170 So I'll delete that pod and have to wait a second or two and after that command is completed we can 27 00:01:50,170 --> 00:01:53,810 then get our pods again and you'll notice. 28 00:01:53,850 --> 00:01:54,370 Wait a minute. 29 00:01:54,390 --> 00:01:56,060 We still got two pods. 30 00:01:56,070 --> 00:01:57,800 Well not quite. 31 00:01:57,810 --> 00:02:01,240 Take a look at the exact name of the pod that we just deleted. 32 00:02:01,410 --> 00:02:06,480 It was posed Stemple then some I.D. and then some other part of an I.D. and then take a look at the 33 00:02:06,480 --> 00:02:07,900 next one down here. 34 00:02:07,950 --> 00:02:11,090 You'll notice at the last part of that is completely different. 35 00:02:11,100 --> 00:02:16,830 In addition the age of this pod right here is only eleven seconds but the instant we deleted the old 36 00:02:16,830 --> 00:02:21,560 pod our deployment automatically created a new one for us. 37 00:02:21,560 --> 00:02:26,330 So I think you can start to see how using deployments to manage some workloads inside of application 38 00:02:26,330 --> 00:02:27,810 are really fantastic. 39 00:02:27,920 --> 00:02:30,820 If anything starts to go wrong well Cuban eddies has our back. 40 00:02:30,830 --> 00:02:36,960 It's going to automatically tried to repair our application now a couple more commands here. 41 00:02:36,980 --> 00:02:42,200 First off it keeps GTL described deployment you can use this to print out some information about a specific 42 00:02:42,200 --> 00:02:42,890 deployment. 43 00:02:42,890 --> 00:02:47,090 Again we're going to usually do this any time that we're trying to debug a deployment and figure out 44 00:02:47,090 --> 00:02:54,850 why it's not working correctly so we can do a cube Seitel describe deployment and then the name of our 45 00:02:54,850 --> 00:02:55,750 deployment was backup. 46 00:02:55,750 --> 00:02:57,460 Here is post dash devil 47 00:03:00,590 --> 00:03:03,910 you can see there is once again a lot of gibberish information here. 48 00:03:04,100 --> 00:03:05,980 Over time a lot of this stuff will start to make sense. 49 00:03:05,990 --> 00:03:09,180 But for right now well there's just a lot of information. 50 00:03:09,200 --> 00:03:11,660 Again the most important part is the events down here. 51 00:03:11,660 --> 00:03:16,810 It's going to tell you about what is going on inside of your deployment. 52 00:03:16,850 --> 00:03:22,490 Next up we can create a deployment out of a config file using that same QCT cell apply dash f command. 53 00:03:22,490 --> 00:03:24,460 And finally if we need to delete a deployment. 54 00:03:24,550 --> 00:03:34,530 Yep cubes EDL delete deployment so we can do a cube CDL delete deployment of post dash double as soon 55 00:03:34,530 --> 00:03:39,060 as we delete that deployment all the associated pods are going to be deleted as well. 56 00:03:39,210 --> 00:03:44,550 So I should be able to do a cube CDL get pods and I'll see that I don't have any pod related to that 57 00:03:44,550 --> 00:03:46,150 deployment running anymore. 58 00:03:46,260 --> 00:03:51,060 So the instant the deployment goes away all the associated pods disappear as well. 59 00:03:51,240 --> 00:03:58,940 I can then recreate the deployment for the cubes GTL apply dash chef both dash double then I'll get 60 00:03:58,940 --> 00:04:01,600 my deployments again. 61 00:04:01,790 --> 00:04:10,680 Yep there it is and my pods and there's the pod created by the deployment now while we're looking at 62 00:04:10,670 --> 00:04:15,020 our list of pods we're going to delete that old pod that we created manually from a couple of videos 63 00:04:15,020 --> 00:04:15,490 ago. 64 00:04:15,630 --> 00:04:21,980 It's going to do a QCT cell delete pod boats again just to get rid of that thing as we usually do not 65 00:04:21,980 --> 00:04:27,140 create pods manually if they crash for any reason that we don't have anything to start them back up 66 00:04:28,870 --> 00:04:30,730 and once that's deleted. 67 00:04:30,940 --> 00:04:31,500 Very good. 68 00:04:31,600 --> 00:04:33,070 We'll go ahead take a pause right here. 69 00:04:33,070 --> 00:04:35,530 One last thing I want to show you around deployments in just a moment.