Hey, everyone.
And welcome back.
Now, in today's video, we are going to discuss about the steps that are required in order to create
the ECS cluster.
Now, do note that in today's video we will not be creating the cluster, but we'll be looking into
the steps that are involved.
So you can say that we have divided the entire X practical video into two set of videos.
First one is where we understand the steps.
Second one is where we'll go ahead and launch the cluster.
Otherwise, if we include both of them in one video, it will be a little longer.
So with this set, let's get started.
Now, when we discuss about creating a cluster, there are two primary ways that you will see.
One is using the x CTL and second one is using the E console or a C now console.
And CLA is something that we already know because we have been creating services using these two options
extensively.
X CTL is one of the popular ways in which you can go ahead and launch the X cluster fairly quickly.
Let's quickly also look into it.
Now if you'll go to the official website of X CTL, it is basically the official CLA for Amazon X.
So what it allows you to do is with minimum set of commands, your entire Kubernetes cluster can be
created.
And this is quite helpful specifically when you are testing things out.
So if you want to create a Kubernetes cluster and test few things, you don't want to create each and
every component and its associated configuration manually, you run single command, let the entire
cluster be created, and you can focus on your testing.
All right.
However, if you're using CTL, you will not really know the exact steps and what are the components
and what are the settings that are involved to create a Kubernetes cluster.
So you can say this is not the best way of learning, but it will save you time.
In today's video, we will focus on creating the X cluster, using the console so that we can see the
exact steps that are involved here.
So the step one is to build the x cluster.
So in this we do not really do anything fancy.
We go ahead and deploy the x cluster.
Now when you create a X cluster, one of the primary requirement here is to also create a IAM role.
Now this IAM role is very important because X needs to connect with other services.
For example, CMS is easy to load balancing and so on.
So for X to be able to do that you need to associate an appropriate IAM role with the permission with
your cluster.
So this is the first important requirement.
Let's also go ahead and look into it.
Now currently I am in the X service, so whenever you go ahead and create a cluster, one of the primary
things you'll have to select is the Kubernetes version.
This is one part.
The second important part, as we're discussing is this cluster service rule.
So there needs to be an appropriate role in this case.
I have a role as X cluster role, which will be associated with the X cluster.
Now, if we look into the X cluster rule, we have one policy.
In fact, let's quickly look into what exactly this policy does.
So you see you have permission related to auto scaling, permission related to the EC, two permission
related to the elastic load balancing permission related to the CMS key.
All right.
So all of these permissions needs to be associated with the X.
So this is one important part.
The second important part is the overall configuration that you use while building the cluster.
Now, we have already looked into the first two options.
So here, which is the Kubernetes version and the cluster service rule.
The other options we will be discussing in the practical video as we create the Kubernetes cluster,
the next important step is to create a node group.
Now, when you create a X cluster, it does not create the EC two instances for you.
You need to have a set of EC, two instances where your application will be deployed and application
will be run from.
So once the EC cluster is created, The second part is to create a node group.
Now whenever you configure a node group, there are multiple configurations that you will have to specify
associated with the EC two instance, for example, the AMA ID which operating system you need your
the instance type.
So in this diagram you see we have three instance type files, TX two micro c4x labs.
You can specify the auto scaling configurations, you can specify the disk size and so on.
Now when you create the node group, this node group will be associated with the X, So whenever you
deploy your application in x, X will in turn go ahead and deploy that application in one of the EC,
two instances that are part of the node group.
Now, in fact, let me quickly show you this.
So I have a EC cluster that is already.
Running in the North Virginia region.
So in that demo cluster that I have, if we go to compute over here, you see that there are two worker
nodes that are available.
So these two worker nodes are part of this node group.
If you look into the demo node group, the desired size is two.
And this is one of the reasons why there are two easy two instances that are running.
In case if you'd like more, you can change the capacity accordingly.
Now, if I open the node group over here, there are multiple configurations here.
For example, the instance type is PT three micro, the disk size is 20, the capacity type, whether
you need on demand instances, spot instances and so on, and various configurations related to auto
scaling and so on.
So just to revise first part is to build the x cluster.
Second part is to create the node group so that X can deploy an application in the EC two instances.
Now when you create a node group, again, you have to associate the IAM role associated with it.
Now this IAM role is very important because node group EC two instances needs to be able to perform
certain operations.
For example, pull the docker image from the ECI repository, manage the network interfaces and others.
So iam role needs to be created here as well.
So if we'll quickly look into the demo node group, you'll see that we have the IAM role that is associated.
Now if we look into this IAM role within here there are multiple policies.
One is associated with the networking, second one is associated with the ACR where the images can be
pulled from and third one is related to the worker node policy.
So if I'll open up the worker node policy, you have basic EC two related actions and the basic X described
cluster action that is allowed.
All right.
So these are the high level steps required to go ahead and create the EC cluster.
In the next video, we'll go ahead and create the cluster from scratch.
And with this will conclude today's video.