Kubernetes- 1 : A Comprehensive guide ! The hottest Infrastructure technology in the planet. | Indira Programmers | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Kubernetes- 1 : A Comprehensive guide ! The hottest Infrastructure technology in the planet.

teacher avatar Indira Programmers, An ex-Cisco,GE, JPM Chase:Data Scientist

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

17 Lessons (1h 46m)
    • 1. Introduction

      1:48
    • 2. Kubernetes architecture#47

      3:18
    • 3. Installing #50

      8:39
    • 4. Minikube install#53

      7:29
    • 5. Minicube on windows#56

      5:23
    • 6. Recording #61

      6:02
    • 7. Install KOPS,AWS CLI#62

      7:42
    • 8. Installing Kubernetes Pre req

      3:42
    • 9. Initialize a new cluster #66

      5:39
    • 10. Recording #71

      9:31
    • 11. RS Manifest#74

      7:34
    • 12. Replicaset manifest file #75

      8:19
    • 13. Replicaset dive in #77

      10:06
    • 14. Updating a deployment #83

      4:52
    • 15. Zero downtime deployment #86

      6:55
    • 16. Recording #97

      3:21
    • 17. Recording #98

      5:28
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

125

Students

--

Projects

About This Class

(part 2 and 3 to come within a week)Currently Kubernetes is the hottest infrastructure technology in the planet .It is often referred as Linux of cloud !If you want to push your career ahead and work with one of the coolest technology than this course is for you !

Containerization is the most important and useful technique in todays world.People along with business and organisations are looking for an easy way to manage their apps.No one needs to do so much work when managing business applications.There is a great need for organizations to scale up to growing number of applications.The best way is to automate this. Kubernetes is the best answer for the same.This container is very flexible , highly reliable and can be automated in the most efficient way.This course would Completely guide you on how to use Kubernetes and get the best out !This course will help you to gain understanding how to deploy, use, and maintain your applications on Kubernetes. If you are into DevOps, this is a technology you need to master. Kubernetes has gained a lot of popularity lately and it is a well sought skill by companies.Happy Coursing !!!!

Meet Your Teacher

Teacher Profile Image

Indira Programmers

An ex-Cisco,GE, JPM Chase:Data Scientist

Teacher

Indira Academy was found in 2001 with the belief of providing high quality ,in depth courses on Radio diagnosis & Technology, available at affordable price.We strive to serve & change lives by our teaching.We have experience in teaching our subjects for over two decade now.The whole effort is for the betterment of students and knowledge sharing.We have been associated with one of the top medical Colleges & Hospitals and also directly worked for companies like GE,Cisco,HP,JP Morgan Chase and Flipkart(@Bangalore,New Delhi and Chennai).

See full profile

Class Ratings

Expectations Met?
  • Exceeded!
    0%
  • Yes
    0%
  • Somewhat
    0%
  • Not really
    0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Introduction: Hello there. My name is Ashish, and I would be your instructor throughout this course. So before we start, I just want to take a step back on. Thank you very much for participating in the scores and want to go in to lose myself. So my qualifications are I'm a B deck masters and engineering on. Do you know, I'm a data scientist and paleontologist who works, who loves to work in technology. I love Internet of things, Google Cloud Platform and related things. I've been in the industry for the last two games. I started my career in 2001 so I've seen all the face. It's off this industry. I'm founder member off into the academy, and I started back in 2001. Andi, I've talked low stool and 20,000 students. Our students. Since then, I've heard various articles published, have co other book. I put generals, white papers I've seen in all the locations off the group and, you know, have a very good interaction with my students across the globe. I'm very ground. I love getting in touch with them, so feel free to reach out to me in case of any questions, I would revert back to you within 24. Ours also Ah, last partner. The least I would keep enriching my course. So you see a lot of content being honored. My your enemy courses. So thanks and welcome on board again. Enjoy. Course. Have fun. Thank you very much. 2. Kubernetes architecture#47: Hello, guys. So let's talk about Cuba. Need architectures. But before that, let's take a minute to, you know first, see the diagram image on the screen, which will help us understand the architecture. So this architecture off Cuba needs provides a flexible, loosely coupled MacInnes for service discovery. Like most distributing computing platforms, a Cuban e cluster consists off at least one master and multiple compute nodes. The master is responsible for exposing the application program interface should doing the deployment and managing the overall cluster each? No. Theron's a container runtime such as doctor or are Kitty, along with an agent that communicates with the master. The node also runs additional component for logging, monitoring, service, discovery and optional order. Adverse lords are the bull courses off a Cuban need cluster. They expose computer networking and storage resources to application. Notes Can be virtual machines. Running in a cloud are bare metal server running within the data center. Ah, part is a collection off one or more containers. The parts SOS as Cuba need core unit off management boards act as a logical boundary for containers sharing the same context and resources. The grouping mechanism off parts make up for the difference between contain your ization on virtualization by making it possible to run multiple dependent processes together at runtime, parts can be scaled by creating a replica sets, which is shores, that the deployment always runs the desired number off parts. Now replica sets delivered the required scale and availability by maintaining a pre defined set off parts at all times. Ah, single part or our replica set can be exposed to the internal or external consumer y service services. What services enable the discovery off parts by associating a set off parts to a specific criteria. Pardes air associated to services through key value pair called labels and selectors and a new part with the labs. Livers that match the selector will automatically be discovered by the services. This architecture provides a flexible, loosely coupled MacInnis for service discovery. In the next lecture, we would be talking about a brief, ah, 40,000 feet above overview off Cuba need master before entering at a granular level. Thank you 3. Installing #50: Hello is we would be talking about how to install Cuba needs in this lecture. We will take a look at some of the ways to install and get started with Cuban ears. We will look at the following five things number when play with Cuba needs number two using Mini Cube to install Cuban ears on on the laptop. Number three. Installing Cuban eights in the Google cloud with the Google container engine. Geeky number four. Installing Cuban AIDS on AWS using the cops stool. And number five installing Cuban Earps. Melanie manually using Cube Diem, which is K U B ADM ah couple of things to point out before diving in first, there are a lot more raised to install. Cuba needs the option I've chosen for this lecture at the ones I think will be the most useful in helping a slam. Secondly, Cuban, it is a fast moving project. This means some of the things we will discuss here will change, but there's nothing to worry. I'm keeping the lectures up to date so nothing will be is relevant. So coming onto the 1st 1 play with Cuba needs, so play with Cuba need is a Web based Cuban is playground that you can use for free. All you need is of a browser and an Internet correction. It is the fastest and easiest way to get your hands on the Cuban. It's let's see what it looks like. Number one point of browser at http play with gay deaths dot com So which is play hyphen with hyphen K. It s that come number to confirm that you are, ah, human and click Plus our new instance, you will be presented with a terminal window in the right off your browser. This is Cuban eat node or Nord one Now number three. Run a few commands to see some of the components preinstalled on the note. As you can see on the screen, the top one were important thing by my mouse cursor. As the output shows, the North already has a docker and cubic, the one the Cuba need Client brings start. Other tools, including cube idiom, are also preinstalled. It is also worth noting that although the common prop is a dollar, we're actually running as root on the North. You can confirm this with who am I or I D commands now moving. Order number four. Use the cube idiom Command to initialize a new cluster venue. Added a new instance in Steptoe speed of Luke A give you a shortlist off commands that will initialize a new Cuba need cluster. One of these was Cube ADM In it, the following command will initialize a new cluster and configured the epi A server to listen on the correct I be interface, as you can see in the scream. Congratulations. You have a brand new single Lord Cuba need clustered the north that we executed The command from Nord one is initialized as the master. The output of the cube idiom in it gives you a short list of command. These will copy the Cuban ease conflict file and set permissions. You can ignore this. A speed of Luke A has already configured them for you. So feel free to poke around Inside off dollar home slash Dark Cube. So we had already done with four steps. Now step number five. Use the cube. E city one command. So very. Find a cluster as you can see in the screen. The output shows a single lord. Cuba needs cluster. However, the status of the North is not really This is because there is no partner for configured when you first log on to the PW. Okay? Nor you were given a list off three comers to configure the cluster. So far, we have only excluded the 1st 1 which is cube idiom in it. So now we're done with five steps. And now we're moving to step number six in step number six. We will initialize cluster networking. Ah, pardon network. Now copy the second command from the list of three commands that were printed on the screen when you first created Nord One. This will be in Cube City one apply command. Best it onto a new line in the terminal, in the book or in the lecture, the common Mira Rapp over multiple lines and insert black Black Slash is you should remove any back slashes and input the command on a single line, as you can see in the screen. Him now moving on to step number seven verify the cluster again to see if nor one has changed too. Ready. Now that part networking has been configured and the cluster has transition into the really status. You're ready toe Add more notes. Step number it. Copy the cube idiom Joint command from the output of the cube. Indium in it when you initialize the new cluster with cube idiom in it. The final output off the common listed as Cuba Idiom Joint Command that could be used to add more notes to the cluster. This command includes the cluster joint token and the I P socket that the A P A server is listening on. Copy the common and be really toe paste into the terminal off New Lord, which is known to step number nine. Click the Add new instance button in the left pane off the peed of Luke IV Window. You will be given a new Lord called Unique Nord in. Nor do we will call this nor two for the remainder of the steps. Finally, step number 10 days. The Cube idiom Joint Command into the terminal off No to the joint token and the I P address will be different in your environment. As you can see, he's on the screen here. No switchback toe Nord one and run another cube city one Get Lord, which you see here you're Cuba needs cluster now has two notes. Feel free to add more notes that the cube idiom joined Common? No. Congratulations. You have a fully working Cuba need cluster. So that's it for this lecture? Ah, we will. Ah, We will discuss a few more things in the next lectures and we will get at a granular level . Thank you. 4. Minikube install#53: Hey, guys, welcome again. So in Canton, a Shinto over last lecture with very were working on the installation. It is worth pointing out that node one was initialized as Cuba needs Master and additional Lord, the joined the cluster has no speed of look. It gives masters a blue icon next to their names and nor the transparent Icahn. This help you easily identify master and notes. Superior Blucas session only lasts for four hours and are obviously not intended for production used. You are also limited to the version off Cuba news that the platform provides. Despite all of this, it is excellent for learning and testing. You can easily add and remove instances as well a steer everything down and start again from scratch. So play with Cuba. Need is a great project ran by a couple of excellent docker captains, you know, and I personally recommended now coming onto another important inspectors. Mini Cube Mini Cube is great if you're a developer and the the local Cuban e development environment or new laptop. Let's quickly discuss about basic mini cube architectural. Andi, you know, let's refer to this this figure. So if you know Dr Mini Cube is similar to a doctor for Mac and Docker for Windows. A super simple way to spin up something on your laptop. So the figure shows how the implementation off Mini Cube is similar to Docker for Mac and Doctor for Windows on the left hand side off. This is the high level many cube architecture. On the right is Ah Dr for Mac or Doctor for Windows Architect. As you can see in the screen at a high level, you download the mini cube installer and type mini cube start. This creates a local virtual machine and spends up Cuba needs cluster inside of the VM. It also sets up your local shell environment so that you can access the cluster directly from the current shell. Uh, yeah, inside of the Mini Cube. Yeah, inside of the Mini Cube. There are two high level things, in fact, VM, and these are as follows. First, there is local cube construct. This runs a Cuba needs stored and Cuban eat master. The master includes an A P A server and all of us. The other control play and stuff. Second is the container. Runtime is spring install at the time of writing this defaults to docker. Ah, so you can specify others if you require. So coming onto architecture, er you know, Ah, which you can see on the right hand side and where I'm pointing through my cursor outside of the being, we have cubic que back to you one. The Cuba needs client. When you're on many cubes, start your environment will be configured so that Cuba, the one will issue commands to the Cuban needs Cluster running inside the Mini Cube. As interesting as the architecture is, the most important aspect off Mini Cube is the slick and sport experience that accurately replicates a Cuban it cluster. No, let's quickly talk about how to install Minnick you so you can get a minuscule for Mac Windows and Lennox. We will take a quick look at Mac and Windows, as this is the most what people run on their laptops. Ah, one point of note is medical requires fertilization extension in a Berlin your system bios now coming or do installing many Cuban Mac. It is probably a good idea to install cubic t one. The Cuban need Klein. Before you installed many Cube, I will use this later to issue commands to the Mini Cooper cluster. Now we have segregated into a few steps and I will come. I will follow the sequence one by one. So step number one is used. Brutalised install cubic t one. And as you can see in the screen air. Right. So this puts the cubic t one bind Rian US user, local bin and makes it excuse table. Now step number two is very fire that the install worked, Which you can see here. This you Coniston. Now that we have installed the cubic T one claim, let's install Munich you and to install the mini Cuba again, you know. Ah, the court you can see on the screen right now you have to provide a pass password if prompted. No step Number two is used Brill to install X highlight weight hyper wiser format. Other hyper visor options are available, you know, virtual box. And we, um we're fusion, but we're only showing excited here and you can see it hit. Yeah. Now quickly moving toe step number. You know, three said the said the user owner off scib Toby route. The falling command should be assured on a single line, and there should be no back slashes in the command, as you can see in the screen right now. Okay, Now, quickly moving to step number. Uh, step number four is to grant in the ability toe. Ah, set you I d The falling command should be. Shoot on a single line. And again, there should be no back slashes in the command on. You can see that here. Now. Step number five is start many cool with the following command and you know you will see. Uh, this common is you know, many Cube start William drivers. I've starting local Cuban e clusters starting for him. So this Yeah. So this would be the come on there and again, I'm re I treating the Come on. It's Ah, many cubes. Start. VM driver is equal to desire. No step number six. So many cubes start is the simplest way to start. Many cube specifying the Veum drive. A driver physical desire flag will force it to use a save hyper visor instead of virtual box. So you you now have a mini cube instances up and running on your Mac. So in the next lecture, we would be talking more about how to use Cuba. T want to verify the Mini cube Install? Uh, tell that I'm taking a quick buzz. 5. Minicube on windows#56: Hey, guys, welcome again. In this lecture, we would be talking about how to install Mini Cube on Windows 10. So in the section we will show you how to use Mini Cube with hyper V as a virtual machine manager. Other option exists, but we will not be showing them here. We will also be using Power Shell Terminal Open with administrative privileges before installing Mini Cube. Let's install the cubic Stephen client. There are a couple of ways to do this. Number one using the chocolatey package manager number. Do downloading. Why're your Web browser? So if you're using chocolatey, you can install it with the falling command, which is Choco. Install Kubel. Ah, Cuba needs hyping clay. I repeat, it is Joeckel. Install Cuban need glad we to see a liar. So if you're not using chocolate, you can doubt or downloaded why your Web browser? A point of a browser toe. Esther TPS Cuba need dot io docks slash task slash tools slash installed cubit sit deal and click the windows stab under install cubic capacity. Mind rewire girl heading you will be given a link to download the latest version using a browser. You do not need to use. See you are one. Was the dollar dis compete? Copy the Q bhakti one dot txt file toe afforded in your system. Um system spot. Verify the installation with Cuba D one version command As you can see on the screen right now, now that you have Q bhakti l t one, you can proceed to install Mini Cube for Windows on its simple ah few step process. Step number one opened the Web Rosen Toe the Mini Cube Really speech on Get up Onda. It's if you see it here. One second. Yeah, as you can see on the screen. Step number 20! Download the 64 bit Windows installers, currently called Mini Cube installer dot dxy number three. Start the installer and click through the Visar, accepting their default option. Number four. Make sure hyper V has an external re switch. Now open hyper V Manager and Goto Virtual switch manager. If there is no virtual switch configured with the falling two options, create a new one, which is no connection type is external network. Allow management operating system to share this network adapter for the remainder of the section. We will assume that you have hyper V configured with an external research call external. If yours has a different name, you will have a substitute the name off yours in the falling commands. Step number five Verifier The Munich. You'll version with appalling command as you can see the screen step number six. Use the falling Command to start a local mini cube. Instance. Running Cuba needs version 1.80 You can use the minuscule get. Give me a swash in command to see a list off available. Cuba Need versions. The following command resumes a hyper V switch call external. You may have named yours differently, though, as you can see the screen this now Step number 77 Verify the installation by checking the version of the Cuban need. Master, as you can see here, if the target machine actively refuses the network connection with an unable to connect to the server, dial TCP dot error. This is most likely a network related at her. Make sure that the external we switch is configured correctly and that you specified it correctly with the hyper V virtual switch flag. Get back. Be one tac toe Cuba needs inside the Mini Cube hyper V V M over Port 8443 So we're done on . We've got a fully working Mini Cooper cluster up and running on your Windows 10 PC. You cannot type Mini Cube on the common line to see a full list off many groups. Sub calmer, it's Ah, good one to try might be medical dashboard. This will open the Mini Cooper dashboard. We geoeye in a new browser tab as you can see the screen air. So so that's done. Probably the best way to spend up a simple Cuba need cluster on your Mac or PC, but it's not here for production. So in the next lecture, we would be talking about Google container engines, which is G e Thank you. Thanks for your time. 6. Recording #61: Hey, guys. So we will be exploring G game or in this lecture. Now that we have the cluster, it's time to have a quick look on it. Make sure your loved on the GC Peak and soul and R veering container cluster on the under container engine. The container cluster pH shows a high level overview of the container cluster you have in your project. The figure, the diagram or the table at the top off the screen right now, which you can see shows a single cluster with three doors running. Version 1.7 dot six off Cuban. Eight. Click the cluster name to drill into more detail. Figure 3.6, which is the one below shows a screenshot off some of the details you can view clicking the connect console icon towards the top right off the Web. You A gives you the option to open a cloud shell session that you can inspect and manage your cluster from so open a closed shell session and run the G load container Cluster list Command. This will show you the same basic clustered information that you saw in the Container Cluster review in the previous figure So let me yeah, go to the next screen yet So the output Evo has been clipped to make it more readable. If you click, connect and choose the shore G g cloud common option. You will be presented with the commands needed to configure your back deal. Talkto the cluster copy and paste those commands into the cloud shell session so that you can manage your Cuba need cluster with Q Bhakti one. I run a Q back to get node Command to list the north in the cluster, as you can see on the screen hit. So now we're done. Um, you know now how to create production. Great Cuba need cluster using Google Container engine. You also know how to inspect it and connect to it now installing Cuban ears in a W s. So there's more than one way to install Cuba Need in AWS. In this lecture, we're going to show you how to do it using the cops stool that is under active development . So there is a constant change happening to it. Cops a short for Cuba need operation on right now. The only provider it officially support is AWS. However, GC is Mbita and Sphere is an Alfa with even more platforms planned at the time off. Ah, giving this lecture. There is also no cops. Boundary for windows. You believe all the falling tow? Follow along with the rest off the other lectures Number one A decent understanding off AWS Fundamentals number two Q Bhakti one number three The cops boundary for your US number fourth there, Deb, The aid of Liu S C L I Tool and number five. The credential often aws account with the permission on the following Amazon Easy to fool Lexus Amazon Road 53 Full access Amazon has three full exes and I am a full Lexus. I am flexes and finally also Amazon v p c. Full excess. The examples below are from Lenox machines, which we are going to risk a snow, but it works the same on a Mac. The example also use. It uses a publicly route able DNS domain corti f one dot com that has hosted with 1/3 party provider such as GoDaddy. Within that domain, we have a subhuman called kids, as that is delegated to Amazon Route 53. You will need to use a different domain in your lab. So now coming onto the procedure for Lennox Machine, it's a four step process. First, use the falling Command to download the latest Q back to you. One boundary to your home directory, which you can see her. The command above a single command. But it's quite long and will wrap over multiple lines in the book and insert backlashes at the end off each print deadline. These backlashes are not part of the command. Step number two. Make the downloaded by Ndri executable, which I have done here. Step number three added to a directory in your path, which you can see here and final step would be Run a cubic t one command to make sure it's installed and working. So that's it for this lecture. In the next lecture, we would be talking about more download or downloading and installing cops. Thank you 7. Install KOPS,AWS CLI#62: Hey, guys, Welcome back. So in this lecture we will be talking about how to download and install cops. So download the cops by angry with the following girl. One command, as you can see in the screen, the commercial. Be sure on one line and have no back slashes in it. It also has a version off the cops stool embedded in the Ural. You can change this. You can see a city. Pius, get of dot com slash cuba Need slash cop slash releases for the leaders. Worship as you can see in the screen here. Yeah, Here. Step number two is make the downloadable bind re executable, as you can see here. Step number three movinto directory in your part, But you can see here. And step number four is rent a cops version. Come on to verify the installation, as you can see here now we will talk about how to install and configure that here double was cli. And for that I'm just moving to the next screen. Yeah, So the example. Hair shows how to install the aws cli from the default app repose used by open to 16.4 The installation method will obviously be different if you are using a different line. X destroyed step includes steps include one run the falling Command to install the AWS Seeley as you can see the screen Step number two is run the AWS configure command toe. Configure your instance off the aws. See light. You will lead the credentials often. Aws, I am account with Amazon. Easy to full access. Amazon route 53 full access Amazon s three full exes. I am full excess and Amazon VPC full access to complete this step this you can see here. Step number three or ah, yeah. I am pointing through Mike Cursor step number trees to create a new s three bucket for cops to share conflict and stayed information. The domain name you use in the example below will be different if you're following along. The Cluster one is the name of the cluster we will create. Okay, it s is a sub Tamin delegated toe Aide Lewis Route 53 TF one dot com is the public domain I've hosted here with the third party. Deify dot com is fictional and only being used in these example to keep the Kamar line argument sharp as you can see here. Step number four is list your s three bucket and grab for the name of the bucket you created. This will prove that the bucket created successfully. This? Yeah, of course. This you see here again, Step number five is tell cops where to find its conflict and state this. You can see her now. Quickly going to the next screen Step Number six, as I said is make your aid of Louis a sass. Such key available to cops the common below which you can see here. The top here will copy the keys in your authorize keys file to a new file in a PSA Such slash i D. Hi. Phone ala si dot Bub This is because cops expects to find your aws as a such key in a file called idee. Underscore RC Dart Pub. In your profiles. Hidden assess such directory. Step number seven is create a new cluster with the following Cops create cluster command as you can see here, the commander's broken down as follows cops create cluster tells cops to create a new cluster cloud is equal toe aws tell cops to create this cluster in AWS using the AWS provider zones is equal toe you hyphen west hyphen one b tells cops to create cluster in the U West one B zone. We tell it to use the delegated zone with the Deena's hyphens own physical toa que it s darty. If i dot com flag we named the cluster with the name flag and the yes flak tells cops to go ahead and deploy the cluster. If you omit the U. S flag, a cluster conflict will be created but it will not be deployed. It might take a few minutes for the cluster to deploy. This is because cops is doing all the hard work creating the air the bluest resource required toe build this cluster. This includes things like vpc easy to instances launch convicts, auto scaling groups, security groups etcetera After it has built the AWS infrastructure. It also has to build a Cuban need cluster coming on to the next step which is step number It was The cluster is deployed. You can validate it with the cops. Validate cluster command, which you can see here. Here you will get to know the instance groups and the north status. So by now, you you know now how to create a Cuban need cluster in AWS using the cops stool. Now that you're cluster is up and running, you can issue cubic t one commands against it. It might also be worth having a poke around in the AWS console to see some of the resources that cops created. So I'm taking a pause here and we will start with the new lecture soon. Thank you. 8. Installing Kubernetes Pre req: Hey, guys, welcome again. So, uh, in this lecture, we would be talking about manually installing Cuba needs. So we will see how to use cube idiom command to perform a manual install of Cuba needs Cuba . Idiom is a core Cuba need project tool that is pretty new at the time off lecture how it's got a promising future and the maintainers of the projects are keen not to mess a ball that come out tomorrow like features. So the commands be show you shouldn't change too much in the future. The example in this lecture are based on open to 16.4 Some of the commands in the pre RECs section will be different if you're using a different line. X destroy. However the procedure were showing can be used to install Cuba. Needs on the laptop in the data center are even in the clothes. We will be walking through a simple example using three open to 16.4 machines configured as one master and two notes. It doesn't matter. These machines are Williams on your laptop or bare metal servers in a data center. All instances in the public cloud cube idiom doesn't affect a tall. The high level plan will be to initialize a new cluster with the normal one. As a master, we will create an overlay network. Then air Noto a North Korea's notes. All three Nords will get darker Cuba Idiom que bullet you back to you one and the C N I. Docker is a container around time Cuba idiom is the tour. We will use toe build the cluster. Cuba is a Cuban need, Nord agent collect one is a standard Cuba need come online plane and the sea and a container network in trophies installed support for CNN networking. Now we will talk about couple off prerequisites for the same. The following command are specific. Toe over to 16.4 as I said, and needs to be ran on all the three notes. They said things up on a 1 to 60.4 so that we can install the right packages from the right ripples. Now the first command is, as you can see in the screen. This will start an interactive session is the falling two lines as separate lines. The terminal will provide the leading greater than sign which is here. This will close the interactive session. Run the falling commands as normal help. I've done it with those comers completed. It's time to in start docker Cuba idiom to back peel and Cuba lit and the sienna run the same command again to verify the installations and see words in in full which we will see it here and has the pre RECs are done and double checked. In the next lecture, we would be talking about how to initialize a new cluster and a couple of other things does them. Thank you very much. 9. Initialize a new cluster #66: Hey, guys, welcome again. So we would be talking about how to initialize the new cluster in this lecture so initializing a new Cuba need cluster with the cube idiom is as simple as typing. Q Bait him in it. As you can see, when I'm pointing through my mouse cursor, the command pulls all required images and creates all the required system parts, etcetera. The output of the common gives you a few more command that you need to run Tau Ceti local environment. It also gives you the cube idiom joined Common on token require toe add additional lords. So congratulations. That's brand new Cuba need plaster created comprising a single master. Complete the process by running the command listed in the output of the cube. ADM innit command short above these commands may be different or even no longer required in the future. Howard, they copy the Cuban need conflict file from ah, back slash e t c backslash Cuba needs into your home directory changed the ownership to you and export an environment variable that does. Cuban ears were to find its conflict in the real world. You may want to make the environment variable a permanent part off your shell profile. Ah, Now use the cubic t one command to verify that the cluster initialize successfully, as you can see here. Okay, so run the falling cubic t one command toe. Find the reason why the cluster status is showing as not ready. As you can see here, this commercials all parts in all name spaces. This includes system parts in the system cube system named Space. As we can see, none of the cube being a sports are running. This is because we haven't created a porn that procured create a partner, Took the example below creates a multi host overly network provided by we've works how our other option exists on you Do not have to go with the example shown hair go. As you can see, this is example I'm talking about. Be sure to use the right version of the we've works conflict file Cuba needs We were not $6 0 introduced some significant changes in this area, meaning the older conflict files will not work with Cuban. Eat 1.61 point six and higher. Now check if the cluster status has changed from not ready Do really which I have done the tail. So the cluster is now ready and the Deanna spars will now be running. Now that the cluster is up and running, it's timeto add some notes. To do this, we need this cluster joint token. You might remember that this was provided as part of the output when the cluster was first initialized in the previous to previous lecture scroll Back up toe that output, copy the cube idiom joint command to the clipboard and then run it on No. Two and no. Three. What point do notice the falling must be performed, performed or no to a north three. And you must have already installed the critics which is DACA Cuba idiom Cuba, TCL Cube lit and CNN on these nodes so quickly I'm moving. You know No, when we repeat the command or north stream. After making sure that the notes successfully registered by running another que bhakti one get notes on the master. We get this as you can see on the screen. So you are mentally built A three note cluster using cube idiom. But remember that it's running a single master without achy now quickly we would just summarize what we have done in the couple of few chapters. In this chapter, we learn how to install Cuba needs and various phase and various platforms. We learn how to use Minnick. You've toe quickly spin up our development environment on your Mac or Windows laptop. We learned how to spin up a managed Cuba needs cluster in the Google cloud using Google Container engine, which is G k. Then we looked at how to use the cops stool to spin up a cluster in AWS using the AWS provider. Ah, here he wrapped up the chap, the chapter or lectures, seeing how to perform a manual install using the Cuba idiom tool. There are obviously other ways and places we can install Cuba needs, But, uh, you know, we have to restrict to cover the entire, uh course. So I'm just keeping the slim to tow it. So thank you very much. In the next a lecture, we will be discussing a few more interesting concepts on facts. Thank you very much. 10. Recording #71: Hey, guys, welcome again. So now we would be talking about deploying parts from a manifest file. So if you're following along with example, saved the following manifest file as part dot Y email in your current directory. As you can see on the screen right now, use the falling Cuba T one command toe pose the manifesto, the A P A server and deploy apart from it head it is. You can see this here. Although the part is showing is created, it might not be fully deployed on the cluster yet. This is because it can take time to pull the required image and start the container. So run a que bhakti one get parts command to check the status which we have done it here we can see the container is still being created, No doubt waiting for the image Toby pulled from doctors hub. You can use a cubic t one described pardes Hello, Part command to drill into more detail If you run the Q bhakti one, get parts command again After a short read, you should see the status as running, so you'll see this. Okay, so congratulations. You're part has been Should do it on a healthy node in the cluster. Andi is being monitored by the local cube led process on the north. The cube alert process Is the Cuban IT agent running on the note? No, let's talk about our let's introspect running parts as good as the cubic t one. Get parts commanders. It is bit light on detail. Not to worry, though there is plenty off options for deeper introspection. Let's take a look at some first up cubic to you. One. Get off for a couple of really simple flags that give you more information. The heifer. No white flag gives a couple more columns, but it's still a single line off output. The hyphen. Oh, why am one and hyphen? O J s o N flag steak? Thanks to the next level, both written full copies of the pard. Many fest from the cluster store. The command below shows a snip Washington off a cubic T one. Get parts hyphen or G as so in command as you can see on the screen. Let me complete. Complete the command. Let me quickly go to the next screen. If you have taken a north off these gorge one second. Yeah, here it is. So now notice how the output above contained more values that we initially said in our 30 line via Emel file. Where does this extra information come from? So two main sources. One, the Cuban need part object contains a lot of properties far more than we defined in the manifest. Those that we don't specify are automatically expanded. The default values by Cuba needs point number two. When you run a cubic t one, get parts with hyphen. Oh, Yem one on hyphen O G s Win Command. You get the parts current state as well as its desired state. However, when you define a part in a manifest file, you only declare the desired stage. So another great Cuba needs introspection. Command is Cuba. The one described This provides a nicely for mattered multi line overview of the party. It even includes some important part lifecycle related events. The following command describes the state off the hello part part and shows a slipped output as you You can see that screen. Yeah, you can see in the screen. Okay, So the output able has been slipped toe better fit the page another way to introspect. The running part is to log intuit or execute commands in it. We do this with a cubic t one e x, C c Command execute command The example below shows how to execute. Appears ox command in a first container in the helo part state. This you can see here. Yes, you can log in. Tow the first container in the part with the following command. Once inside the container, you can execute normal commands as long as the command boundaries are installed in the container. The Q back to you. One e x e C command will lock into the first container in the part and create a new shell session once inside the container that see you are one Kerr one command transfers data from the service listening on port 8080 As you can see here, the hyphen it flags, make the eggs executive session interactive and connect STD I am and STD out on your terminal windows with yesterday in an STD out inside the container. When the command completes your shell, prompt will change, indicating that your shell is now connected to the container. If you are running multi container parts you will need toe pass the cubic t one eggs executed. Execute. Come on the container flag and give it the name of the container in the part that you want to create the eggs E x c. C. Session with. If you do not specify this flag, the command will execute against the first container. In the part, you can see the ordering and names of containers and part with a cubic T one. Describe parts command. One other command. Foreign prospecting parts is the cubic T one logs command like other part diligent commands . If you don't specify a container by name, it will execute against the first container. In the part. The format of the common is Q. Back to you one logs. So let me quickly summarize world things we covered in the last few chapters. So we learn, or the lectures. We learned that the atomic unit off deployment in the Cuban Eadweard is the part. Each part consists of one or more containers and gets deployed to a single lord in the cluster. That deployment operation is, and all or nothing atomic transaction. The best way to deploy apart is declarative Lee, using viable or Js when many fest file views The cubic t one command toe post the manifesto AP A server. It gets stored in the cluster store and converted into the in tow Part spec that gets Should you'll onto Helicke Luster Nord with enough available resources. The North Armenian component that accepts the parts spec is a cube cube lit. This is the main Cuba need agent running on each Nord in the cluster. It takes the parts spec and is responsible for pulling all images and starting all containers in the part. If apart face it is not autonomic automatically re should your. Because of this, we usually deploy them by higher level constructs such as replica asserts deployments and demon sets. These higher level constructs are things like self healing on rollbacks and are at the heart of what makes Cuba needs so popular. FEMA's because of the good power Full ah features. So that's it for this lecture. We will proceed with other fresh Cuba need detailed topic in the next lecture. Thank you very much 11. RS Manifest#74: Hey, guys, welcome back. So in this lecture we would be talking about, Replica said, Manifest files. As with parts and other Cuban Eve's object, replica sets are deployed declarative Lee using Vie, Emmel or Jay so and manifest files. Now, if you are new to Cuba needs these manifest files can be a bit complex. But again, since we would be drilling it down, we would be are talking a bit more on this understanding a bit more, so it would be pretty easy. So let me quickly come to this. The falling Why am l file is a fully working replica set manifest. It works with Cuba needs 1.8 and later on requiring the app slash even beat a do a p I and a high level of deploy stand replicas off a single container part. The part is based on on the image we field on. Listens to port 8080 Now for version off Cuba need pride to 1.8. You should replace the app slash. We even beat her to a p A. With extension slash even beat a one. You should also remove the three consecutive line, starting with selector Match labels on APP. Hello word. Now, as with pard Manifest, Replica said. Many fest have four top level resources. First is a p a version or we can say dot AP a version Second is kind or not kind and third is metadata or dark meta data, and third is spec or dark speck. So it is common to use simple dark notation when referring toa components off. Cuba needs manifest files the four top level resources we have shown our replica sir dot ap a version. Ah, comma replicas there dot kind on replica said dot meta data and replica, sir Dark Speck. However we normally omit the replicas had perfect sense. Simply name as dot AP a version chi or for the others dot kind dart meta data and dot spec No, if you talk about the second in yellow, it's a visual breakdown off a manifest into these four top level resources. Now let's step through the file in a bit more. All Cuba needs manifest filed start out by declaring the war Asian off the FBI to use dot FBI wash in different versions of the a p A. Use different objects. Schemers this means the schema for a replica cert in the app slash Even beater to FBI will have different properties and fields than the schema for the replica assert object in the extensions slash. We even beat a one FBI starting that Cuba need one point it. You should use app slash even be tattoo for deploying replica sets for older version off Cuba Needs. You can use the older extensions backslash we even beat our one the dot kind Feel tells Cuban ears Which type of object is being defined in this example. It's a replica said behind the sees this. Make sure the manifests gets delivered to the replicas. Had controller on the Cuba need control plane? The dark kind feel is always a string and is always written in camel kiss. The only required feel in the dark meta data section is the name of the replica set. In this example, we are naming VEB hyphen ours. The name off, a replica said, is a string, and it has to be unique in the name space. The replicas had exists in the form name space. On this instance, you can add labels and other meta data in this section the final top level resources in the dark specks section. This is where the main configuration of the replicas that lives No, you know what example? Darts spec dot replica is declaring a desire state where 10 copies off the replica sets part will always be running. This property is at the heart of Replica asserts it is used when the replica start is initially deployed, as well as during scaling and healing operation. For example, when you scale a replica said you agreed the field. Now dark speck dot Selector is new in the apse Backslash we one vita to FBI in Cuba needs 1.8 it lists. The label on a poured must part must have to be managed by the replica set. In this example, we're telling the replicas there to manage all parts in the cluster that have the level up . Hello word dot spec, not template is the part template. It describes the part that this replica set will deploy. This includes initial deployment as Vela scaling and self healing operation. For example, when scaling or healing the replicas, air deploys additional copies of the part defined in this section. Now dark speck dot template dot meter leader Dart levels in the list off labels that the replicas it set will apply to parts it creates. In this example, all parts deployed by the replicas help will be tagged with the app Hello work living. If you are using the app backslash, we even beater to FBI. It is vital that this matches the replicas. That's label selectors specified in darts spect dot selector. If it does not, the FBI will reject the replica certain. So finally, darts back door template Dark speck defines the container that will run in the part. This examples a single container part but multi container parts have multiple dots. Back door Tam played darts spec dart container entries before moving on. It's worth noting that the poor Tempted section, which is not spec dot template in in a replica set manifest, is exactly the same as standalone poured manifest. This is because replica sets create Standard Poor's, using the standard port related AP A calls and then point. The only difference is that the replica asserts rap parts in a blanket off self healing and scalability. So with this I'm taking a pause on, we will discuss a bit more about parts Ah and its associated properties in the next lecture . Ah, thank you very much. 12. Replicaset manifest file #75: Hello, guys, this is a she share again so we would be talking about, Replica said. Many fest files. So, as with parts and other Cuban Ito objects, replica sets are deployed. Declare irritably using y Emel or GSO and manifest files. If if you are new to Cuba, need these manifest files can be a bit complex and my take long off your attention. But there's nothing to be worried about. The following via email file is a fully working replica, said Manifest. It works with Cuba Needs 1.8 on later, requiring the app slash even beat A to a P A. At a high level ER deploys around and number of replica off a single container part. The part is based on the image we afeard and listens to the port given for version of Cuba Need prior to 1.8. You should replace the app slash even beater. Two FBI with extension slash even beat a one. You should also remove the three consecutive lines, starting with selector, mash levels and up. So as you can see, I mean, you can see the entire program and I'll call it on the screen right away. as with the port manifest Replica said Manifest, have four top level resources. One AP I wasn't too kind. Third, meta data on third this back It is common to you simple dark notation when referring to components off, Cuba needs manifest files. The four top level resources we have shown our replica shirts don't FBI version comma replicas air dot kind calma replica said dot meta data on replicas said darts back, however, be normally or mid replicas had perfects and simply name them dot FBI version dot kind Dark Middle Rita and not Spec. So, as you can see on the ah screen, it's a visual breakdown off the manifesting toe into these far four top level resources. Let's step through the file in a bit more detail. Now all Cuba needs manifest file start or but declaring the word Asian off the FBI to use, which is dot FBI worship a different version of the A P. I use different objects. Keep us. This means the schema for a replica sorry in the FBI, AP P is slash even beat a tow, FBI will have different properties and feels then the schema for the replica said object in the extension. Backslash we even beat a one. FBI, starting with Cuba, needs one point eight. You should use APS slash even be the two for deploying replica sets for older washing off Cuba needs. You can use the older extension. Slash we even be tell one. No, the dot kind find as Cuba needs. Which type of object is being defined in this example? It is, Replica said, behind the scene. This. Make sure the manifest gets delivered on the replica, said Controller on the Cuba Need Control. Playing the Dark kind field is always a string and is all resident. In Camel case, the only required feel in the dark meta data section is the name of the replicas certain in this example we are naming it something. I mean, we can take it that as part of our choice, the name of replicas starters is a string added us to be unique in the name space, the replica said exist in the report Name space. In this instance, you Conard levels another middle leader in the section, the final top level resource in the dark specks section. This is where the main configuration off the replica set lives in a you know, an example. Darts back dot replica is declaring a desire state were 10 copies off the replica search. Sparred. Basically, these three copies off the replicas that sparked will always be running. This property is at the heart of replicas, sirs. It is used the replicas that is initially deployed as well as during Skilling and healing operation. For example, when you scale a replica, sir, do you update the field? The dot spec and dot selector is new in the apse backslash we even beat up to a P I in Cuba need 1.8 it, Liz. The level that apart must have for it to be managed by the replica set. In this example we're telling the replica said to manage all plot parts in the cluster that have the label up given so darts packed. Our template is the port template. It describes the part that this replicas that will deploy. This includes initial deployment as well a scaling and self healing operation. For example, when Skilling or healing the replicas of deploy its additional copies of the part defined in the section the dots backdoor template dot metal eater dot levels is a list off levels that the replica certain will always toe applied to part that creates now, in this example, all parts deployed by the replicas TSET will be tagged with the APP label given if you're using the app backslash, we even beat Ato FBI. It is why to that the matches that matches the replica sets label selector specified in darts back, not selector. If it does not, the FBI will reject the replica set. Finally dot spect. Our template dot spec defines the container that will run in the part. This example is a single container part but multi container part. Have multiple dark spectre attempted or spec container and trees so Cuban it manifest files can be daunting, so nothingto worry about its complexity. It's not crystal clear yet. Ah, once we go forward on couch, cover a few more chapters than make sure to come back. Um, you know, and you will understand more before moving on. It is what? No, noting that the part templates section, which is dark spectre template in a replica, said Manifest is exactly the same as standalone part manifests. This is because replicas has create standard parts using the standard part related AP a calls and endpoints. The only difference is that replicas Ertz rafts part in the blanket off self healing and scalability witches off. Great help to the users. So with this, you know, being ah only completed this I'm taking a pause right now and we will dark and discuss more in the next lecture. Thank you very much. 13. Replicaset dive in #77: Hey guys, welcome again In the section we would be talking about replica sets, so let me quickly walk you through a brief history, which I already did. But let me reiterate. Replica Set is the next generation replication controller. The only difference between replica set and replication controller right now is the selectors support, Replica asserts supports the new set based Select A Requirement, you know, as we only discuss where is a reflection. Replication controller only supports equality. Be selective requirements. Now how to use a replicas it now most que bhakti one commands that support replication controller also support replica sets. One exception is the rolling Update comer. If you want the rolling update functionality, please consider using deployment is still. Also the rolling of Red Command is imperative areas. Deployments are declarative, so we recommend using deployments through rollout. Company commander, while replica said, can we use independently today? It's mainly used by deployments as a mechanistic orchestrate, part creation deletion and updates. When you use deployment, you don't have to worry about managing. The replica asserts that the create deployments own on managed the replica sets when to use a replicas, it are replicas, said in shores that ah, specific number off port replicas are running at any given time. However, our deployment is the higher level concept that manages replica sets and provides declare a tive updates to parts along with a lot of other useful features. Therefore, Vedic amend using diplomats instead of directly using replicants. It's ah less he require custom abrade or castration are don't require a blitz at all. This actually means that human never need to manipulate replica set object user deployment instead and define your application in the spec section. Now let's quickly moved to one of the examples, which illustrates the details which we just discussed, and you can see that on the screen. No saving this manifest into front and RTM one and submitting it to Cuba. Need cluster should create the defiant replica set and the parts that it manages, as you can see on the screen. So now, writing a replica sets spec as with all other Cuba, need epi, a objects of replica said needs the epi a version kind and made a data file feels for general information about working with many fists. You know, we will be discussing it as we go Farber, But for now, just hold on for a while. Are replicas that also needs dot spec section No coming or do Ford templates. So the dot spectrum plate is the only required feel off dot spec. The dark speck template is a pod template. It has exactly the same schema as apart, except that it is nested and does not have a A p, a version or kind. In addition to required fields off apart, apart template in a replica, certain must specify appropriate levels and an appropriate restart policy. Far livers make sure do not overlap with other controller. For restart policy. The only allowed value off darts back door template dot spec not restart policy is always, which is the default for local container restarts. Replica, sir. Delegates to an agent on the North, for example, the cube lit or doctor now coming onto parts selector. The Dark Specks selector field is a label selector are replicas. Certain manages all the parts with labels that match the selector. It does not distinguish between parts that that it created or deleted, and part that another person our process created or deleted This allows the replica, said Toby replaced without affecting the running parts. The darts back dot template dot meta data Dark labels must match the dot spec dot selector , or it will be rejected by the A P A. In Cuba Need 1.9. The epi. A version APS backslash re one on the replica set kind is the current version and is enabled by the fort the A P a version APS backslash We won better, too, is de placated. Also, you should not normally create any pores whose levels match this selector either directly with another replica set or with another controller, such as deployment. If you do so, the replica, certain things that it created the other parts. So if you do end up with multiple controllers that have overlapping selectors, you will have to manage their delish in yourself. Now, coming onto labels on the replica. Send Now, the replica said, can itself have labels, which is dot meta data dark levels. Typically, you would set these the same as the dots backdoor template dot meta data dart levels. However, they're allowed to be different on the dark Meta data Dart labels do not affect the behaviour off the replica SEC coming onto replicas. You can specify how many parts should run concurrently by setting darts back dot replicas. The number running at any time may be higher or lower, such as if the replicas was just increase or decrease or, if apart is gracefully shut down and the replacement starts early. If you do not specify dot spec, not replicas, then it defaults to one. Now let's quickly moved to how to work with the replica sets. Oh dear Leader, replica set and all its sports Use que BEC be one. Delete the Cuba deal ville scale the replica set to zero and wait for it to believe each part before deleting the replica set itself. If this Q back pl command is interrupted, it can be restarted when using the rest AP A or Go client library. You need to do the steps explicitly so you can delete a replica assert without affecting any offer. Its parts using Q Bhakti one. Believe Vidia Hyphen Cascade is Eagle do false option when using the rest. AP A or Go client library simply believed the replica Certain objects. Once the original is deleted, you can create a new replicas certain to replace it as long as the old and new dart spec dot selector are the same. Then the new one will adopt the old parts. However, it will not make any effort to make existing parts match a new, different part template toe update. Parts toe a new spec in a controlled way. Use a ruling update. Now let's talk about isolating parts from our replica said parts may be removed from replica certain, Target said. By changing their levels, this technique may be used to remove parts from services for debugging data recovery etcetera. Parts that are removed in this way will be replaced automatically assuming that the number of replica is not also changed. Okay, now coming or do scaling a replica. Sir, our replica Sirte can be easily skilled up or down by simply updating the dark speck dart replicas field. The replica, said controller, ensures that our desire number off parts with a matching label selector are every level and operational. So I'm taking a pause here in this lecture and then I would be starting a fresh ah, and we would be talking a bit more about replica set Ah, like in your replica shirt as an horizontal part or to skill er, targets and so on. Thank you 14. Updating a deployment #83: Hello, guys. A. Let's quickly dark where we left earlier in the lecture. So let's talk about of dating or deployment are deployments. Rollout is triggered if and or leave the deployment sport template, which is darts back door template. But you can see her is changed. For example, if the label or container images off the temperature abraded other upgrades, such a scaling the deployment do not recur Our rule out. Now suppose that we now want to update the n g and experts to use the i N g annex 1.9 dot one image instant off one dart 7.9 image. All right, uh, which is here, which I mentioned here. Alternatively, we can entered the deployment and change darts. Spec Dar template start container dart image from Engy Annex 1.7 dot nine toe 1.9 dot one No. Do you see the rollout status run? You know, um, everything This After the rule of succeeds, you may want to get their deployment. No, this you can see here, but the number off up to date replicas indicates that the deployment has updated the replicas toe the latest configuration. The current replicas indicates the total replicas this deployment managers and the available replica indicates the number of current replicas that are available. We can run que Bec the one get arrests to see the deployment, updated the parts by creating a new republic assert and skilling it to three replica as well as killing down the old replica set to zero replicas. Yeah, So I'm quickly going. Yes, as you can see here. So we're running. Get part should now show only the new parts which you can see here. Next time we want to update these parts, we only need toe abrade. The deployment sport template again deployment can ensure that only a certain number of parts maybe down while they are being updated by default, it ensure that at least 25% less than the desire number of parts are up a 25% max. Unavailable deployment can also ensure that only a certain number of parts may be created above their desire number off parts by the fort. It insured that at most 25% more than the desire number of parts are up, which is 25% max Search, for example. If you look at the above deployment closely, you will see that the that it first created a new part, then deleted some old parts and created the new ones. It does not kill old parts until a sufficient number of new parts have come up and does not create new parts until a sufficient number of war ports have been killed, it make sure that number off available part is at least two, and the number of total part is at most four. Now, if you see this right on the screen here, we see that when we first created their deployment, it created a replica set NGI next deployment and scale it up to three replicas directly. When we Abd entered their deployment, it created a new replica set again, NGX deployment and Skillet upto one and then scared down toe. The old replica said to to so that at least two ports were every label and at most four parts were created at all times. It then continued Skilling up and down the new and the order pick a set with the same rolling updates strategy. Finally, we will have three available replicas in the New Republic assert, and the old replicas said Assert is skilled down to zero. So that's it in this lecture, didn't we understood? And we Ah, we discussed in detail how toe update our deployment in the next. Like we will proceed for that in the next lecture. Until then, I'm taking apart, so thank you very much. 15. Zero downtime deployment #86: Hey, guys, welcome back. So we would be talking about zero downtime deployments in Cuba needs. So Cuba needed simply a container orchestration platform, you know, and we would be talking more about rolling deployments so Cuban it provides out of the park . Support for rolling deployments through deployments are deployment makes use of replica sets, which are replication controller, capital off supporting, said based selectors. For our casting, the part deployment a good example is better deployment has bean abated. A new replica set will be created based on your strategy, and the oil and the new replica sets will be adjusted until the deployment has bean finished. So the deployment provide us with the easy and effective way of rolling updates. But it doesn't provide ah, full solution to those who need zero downtime during the ruling often update during deployment. There is ah need for us to ensure that there is no availability disruptions for us to achieve. We have to address a couple of issues. Number one connection training, second http Keeper life. So we would be talking more about First is connection draining. We don't need tohave over container killed as the process is often flight request is being done for us to do this. The falling steps unnecessary indicated, indicate that we do not need to receive more new requests. Big given time is to finish the request which are currently being processed with Cuba needs . We can add a readiness probe to the container in case the profiles, then request to be sent to the service won't be routed toe over container the falling and handle number one in the steppes given above. As you can see where I'm pointing through Mike Carson, eso in the case off number two depending require should be given time so as to finish. So the Cuban need will send a sick TEM signal to the process off the containers. Who has to instructed to shut down in the right procedure prior to the sending off sick ill . The container has to be given a grace period which is termination grace period second so that it can shut down so we can stick to this. And instead of having toe handle the sick term in our app, the error lifecycle hope this is an indication that people being positioned to execute any Arbit ready command such as when we need to gracefully shut down over container. The example given below will fill the readiness probe simply by taking down a health check before Cuba needs can send the sick TEM signal, which you can see here now to keep as to depict keep alive the connection draining given above will allow our in flight request to finish. However, in cases where a connection string is using us to tp keep alive, the Mississippi connection will remain open on. It will be used for other requests for us to solve this problem. We're going toe. Add a proxy dare for terminating STP Connection. On it will proxy the request to the actual back and service, which are the containers. The proximal make use off connection close with beckons and others so that the requested processing can be made to be more robust. So example application. In this example, we will be using a simple N g i n X container, which we have used earlier as well, which is two word Asian on the home page. One will say red, while the other one will say blue. The deployment will be tested by use off these two. We will also use Ah etch a proxy container for the purpose of terminating http connection found on of a proxy tear. So creating the service, we will be creating the falling to services. One is about my app, the application and the other is my app. Hyphen proxy for application eso Ah, the Maya proxy will be responsible for taking requests and then sending them to the back and ah which that my APP service prides. So we have to run the following commands for the purpose off creating these services as you can in the screen. So now that we have created the service, there is there is a need for us to create the deployments for the proxy and application on now the next activities to create the deployments. To do this, you only have to run the falling commands as you can see in the screen. So you should then have the deployments running after, you know, after a few minutes. For those who are making use off Mini Cube, just type the following and you will see the application. Once the browser has been open and you will be red color on your screen, just type the falling. And this minute cube has been explained by me in earlier lectures are now coming onto testing. You should not go ahead and opt in the Maya proxy. Ural, since we believe it for testing poppers, we will now begin to make use off Apache bench for sending traffic to the service on the deployment will then be updated with a blue image. The use off hyphen K flag will help us to patch test STP keeper life scenario, you know, as the you know, come on. Runs. You should go ahead and run the falling so that you can launch the rolling update. Uh, this you can see here. After that, just refresh on the browser. On you will observe the red on blue color swapping on the screen. You will see finally settle on the blue wash in. When you look at the Apache bench, this time you will see zero failed request. So I think I should take a pause, you know? And in the next lecture I would be discussing or containing with the same So are tell them . Stay tuned. Thank you. 16. Recording #97: Hello, guys. So let's continue the lecture. No, we will be talking about creating the poured using the viable file. The first step off course is to go ahead and create a text file. Call it. Let's call it for dot of I am alone and are the following text just as we discussed earlier . Now the second step is saved the vile file and tell Cuba needs to create its content. No. Yes. As you can see, gay, it's reference the name we give the part. You can see that if you asked for a list of the parts Ah, if you ah we will get this as you can see on the screen if you if you check early enough, you can see that the port is still being created. After a few seconds, you should see the containers running from here. You can test out the part just as we did in the previous ah version. But ultimately we want to create that deployment. So let's go ahead and delete it. So there aren't any name conflicts. And this if you see you know, I have done it here right now, troubleshooting the pod creation so sometimes Of course, things don't go as we expect. Maybe you have got on it and networking issue or you have mistyped something in your VIII Emel file. You might see an error like this. In this case, we can see that one off over containers started up just fine, But there was a problem with other to track down the problem. We can ask you beneath for more information on the part. As you know, probably you can see here. As you can see, there's a lot of information here, but we are more interested in the appearance. Specifically was the warning and error start showing up from him. I was ableto quickly see that I had forgotten toe add ah column. We've won tag to my image. So it was looking for the later stack which didn't exist. To fix the problem, I first deleted the part, then fix the viable file and started again Instead, I could have fixed the ripple so that Cuba needs could find what it was looking for, and it would have continued on as though nothing has happened. Now that we have successfully gotten aboard running, let's look at, uh, doing the same for deployment so that we will cover in the next lecture. And I'm taking a pause here, you know, just so that I don't make the lectures very long. Thank you. 17. Recording #98: Hello guys. So let's stock or create a deployment using Why am L? No. Finally, we're down to creating an actual deployment before we do that. Do it's worth understanding what it is. Well, actually doing no kid as remember container base resources. In the case of deployment, you are creating a set of resources. Do we managed, for example, very created a single instance of the part. In the previous example, we might create a deployment toe tell Cuba needs to manage a set off replicas to that bad, literally a replica, sir, to make sure that a certain number of them are always available. So we might start over deployment definition like this as you gives him the screen, we are specifying the EPA version as extension backslash we've unbeatable. Remember, deployments aren't in V even as pours world and that we want the deployment. Next we specify the name. We can also specify any other Mentadent of Ivoire, but let's keep things simple for now. Finally we get into the spec in the parts Spect we give information about what actually went into the part. We will do the same thing here with the deployment we will start in this case by saying that whatever port deploy, we always want to have to replicas. You can see this number however you like. You like off course, and you can also set properties. Such a selector that defines the parts affected by this deployment or the minimum number of seconds apart must be up without any other before it is considered. Really. Now you can find a full list of their deployment specifications properties in the Cuban need, ah of even beat a one AP a reference says We discussed earlier and you can see all the details there. So now that we know we want to replicas, we need toe. Answer the question replica off what they are defined by, you know, let us go toe a template, you know which it defines the same. And as you can see in the screen, you know, and you will see it looks family, and it should be virtually identical. You know, our do the part definition in the previous section, and that's by design templates are simply definition off objects to be replicated objects that might in other circumstances, be created on their own. Now let's go ahead and create their deployment at the Via Hammer toe to a file called deployment dot my Amell and Boyd. Cuba needs at it. As you can see head to see how it's doing. We can check on their deployment list on this. Yes, we can check. Ah, How is it doing here? Yes, So, as you see Cuban, it has started both replica, but only one is available. You can check the event log by describing their deployment as before. So, uh, head is where you will get the event log. Yes. So, as you see here, there's no problem. It just hasn't finished scaling up yet. Another few seconds and we can see that both boards are running so and and that state will get this. Okay, So now let's summarize what we have done so far. Let's review we have basically covered three topics. Number one VIII Emmel is a human readable text based format that lets you easily specify configuration type information by using a combination off maps, off name value pair and list off items and nested versions off each by number. To vie Emel is the most convenient way to work with Cuba. Cuba needs object. And in this article we looked at creating pores and deployment. Number three. You can get more information on running or are should be running object by asking. Cuba needs to describe them. So that's our basic via family tutorial or a lecture is done. We are going to be tackling a great deal of Cuba. Needs related contents in the coming lectures, you know? Ah, so Ah, thank you very much for participating. Ah, see, you assume.