Let's hide the terminal and now let's do following.
Now, I would like to demonstrate you how you could combine deployment, YAML and service YAML configuration
files just in one file.
Let's close those files and let's create a new file and let's name it the k eight as web to engine x
dot yaml.
Like that.
Now, in this configuration file, we will combine instructions for creation of the deployment and service.
Let's first go to service dot yaml.
Take contents of this file.
And based here in the k8s web two engine x yaml afterwords.
Please add three dashes exactly three and go to the next line.
Now let's go to YAML file for the deployment.
Let's take all its contents and paste here under those three dashes.
And now just in single file we have specification both for service and deployment.
Now let's modify deployment because we would like to utilize either image and here we will utilize our
other name.
By the way, we could select this name here, then right button click and select change all occurrences
and let's name service and deployment as k eight as web two and Gen X like that.
Let's keep type for this service as a load balancer.
Port here could be modified to another, for instance.
Let's set it to all three like that.
And here in the deployment specification, let's decrease quantity of the replicas to let's say three
and also let's modify specification for containers and image which we would like to use right now will
be k eight as web to engine x.
It was replaced when I modified the K eight as web hello name.
So here is the correct image which we just push the Docker hub and this image we would like to utilize
for this particular deployment and container port will be unchanged this 3000.
All right.
That's it for specification for deployment and service for new application.