All right.
We are done with creation of the configuration file for deployment.
So here is deployment.
And let's now apply this configuration file using declarative approach.
Creating such file in place, you will no longer require to enter command cubes.
It'll create deployment.
You will just enter command cubes.
It'll apply.
Let's do that.
Let's open up.
Embedded terminal here and now I am still inside of the k8s web hello folder.
Let me go out of this folder where this deployment yaml file is located.
Let's list files here.
So here is deployment yaml configuration file.
And here let's enter command cube still.
Apply this f stands for file and here will be name of the file.
Deployment dot yaml.
Simple as that.
File was applied and deployment was created.
Let's check that.
By the way, here, I don't have alias.
Let's add quickly, alias, alias, K Cube, CTL.
So they get deployments and now there was K eight as Webb hello deployment.
And there was a single port in this deployment.
Get boats.
Here is the spot which is up and running.
Wait.
But how we could now scale this deployment and increase quantity of the replicas very easily by modification
of this specification file.
But how?
We could increase quantity of the replicas here?
At the moment, we don't see any numbers.
Let's try to find out that using documentation, I assume that I don't know how to change that.
So let's go to Workload Resources, check deployment and scroll down here.
So spec status, metadata, kind.
No options here.
Let's click on deployment spec.
Here was selected template replicas, number of desired ports and thus that option which you need to
utilize if you want to modify quantity of the replicas from default number one.
So here is default number one to any other number and you have to add replica key in the deployment
spec.
So let's go to deployment spec.
So here we are spec.
And here let's add new key replicas.
And this value will do, let's say number five.
If I go back, I could read that its value is integer 32.
So you don't need to write here file like that, right?
As a number, let's save changes and let's apply this deployment YAML configuration file again using
same command cube.
Still apply this f deployment yaml.
Let's go ahead configured k get port.
And now I see that four new containers are being created and now my deployment has five different ports.
Four of them are already ready.
Now five are running.
That's how we were able very easily modify our deployment simply by modification of the deployment YAML
configuration file.
But of course now there are no services.
K get SVC.
Let's create new service using similar approach.