This is the practice lab for assigning notes, electors and communities.
So for the first question, we had to find the number of labels on Northera one.
And to do this will only come on CubeSat, we'll get notes N 01 and we use the Dashty surely will flag
any air.
You can count the number of labels.
It's one, two, three, four, five in total.
So the answer is five.
Next, we'll have to check the value that is assigned to the label meter or coupon at the store, I
ask.
And here you'll see that the value is set to AMED 60 for.
Next, we had to apply a new label called Color is Equal to Blue to another one.
And to do this will on the command trail label, not know that one.
And the label has color is equal to blue.
Let's run the same command as before, and we can see that the label has been set.
So let's move on.
Next, we had to create a new deployment called Blue with engine image and six replicas.
And to do this will use the imperative, come on, Cuba will create deployment, the name of the diplomates
Blue Dash Dash emergency call to Ingenix.
Now we can scale it to six replicas using the capability scale deployment command dash replicas of 026.
Which notes are the parts, please, on?
So let's run Cuba CTL.
Get notes, Nash or White?
And here we can see the six replicas created for the blue deployment and you can see that it is created
on Northera one and one of the parts is greater on master.
So Gensler's master and Nordström one.
Next, we had to set no affinity to the deployment to place the parts on order one only.
And to do this.
First, let's check the deployment's, get it into Oyamel format, so here I'm running capacity, I'll
get deployment's.
Blue and redirecting the YAML into a file, and you'll see that.
We have said the apples to blue for this deployment.
So our next job is to assign no definitely rules and to do this we will make use of the community's
documentation.
So look up.
No, definitely rules and the government has documentation.
And it is that assigned sign, Potts notes, using node affinity.
So you can copy the value from this example here.
And pasted under the specs section.
Make sure that the formatting is correct.
Just lining the fields here.
And we'll shortly make changes to the key and values, so this should match the levels that we have
created for the deployment so you can copy the example as it is and make sure that the key and values
are changed.
So we know that the value should be blue and the key is color matching the levels of the deployment.
So once this is done, we can delete the deployment so that all the parts which are created earlier
have been removed.
And then we will create the deployment.
When we can now check the ports again, but make sure that you wait for a while because the ports from
the all the deployment would be dominating.
Let's take the answer.
Now, let's go back and check the ports and see which notes they are assigned to right now.
Now you'll see that all the parts have been assigned to another one, this is because of the no definitive
rule that we have set for No one.
So all the parts with the label color is equal to blue will be assigned to the node, which also has
the same label, which is not the real one.
And the answer is not zero one.
Next, let's create a new deployment called Red with engine and three replicas and ensure it gets placed
on master only and the master already has a label.
So make use of that when defining.
We know definitely rule.
First, let's create the deployment.
I will use the image engine X.
I will also use the actual Yamal, but first we'll use the dash dash dry run so that it does not create
the deployment yet.
So let's go into the file.
Let's change the replicas to match the requirement and the question, which is three.
And now the same as before, under this section, we can paste the copied lines from the it is documentation.
And here we can make use of the operator exists and will define the key and the key, we can copy from
the question so we do not have to define the value specifically here.
We can just copy the key.
So as long as the key exists, which is not natural, that governor is as master, as long as that exist,
the node affinity rule will be applied.
Make sure the formatting is correct.
And now we should be good to create the new deployment.
So save the file and create the new deployment using you still apply airfreighted odioma.
And the deployment has been created, we can check which nodes the pods are running on using the actual
wide command, and you can see that all the three parts are now running on master.
Our answer is correct, that was the last one.
Thanks for joining me on this.
I'll see you in the next one.