Let's save changes in this file.
And now let me actually show how to find documentation on how to create specific YAML configuration
files.
Let's go to a web browser and here let's go to Kubernetes dot IO and go here to documentation.
And here I go to reference and here are select Kubernetes API.
And in Kubernetes API, you could select, for example, workload resources and you will find the details
how to describe, for example, ports or create port template or create replica set.
We just created deployment.
Therefore, let's click on deployment section here and you will find the details.
How to create YAML Configuration Files.
If you want to create deployment, API version must be set to APS slash v one and below you will find
other keys which must be present in deployment configuration file.
For example, client must be set to deployment.
Then there was metadata section spec status.
Status, by the way, is filled by Kubernetes automatically and it will be added after you create deployment
based on specific configuration file.
And if I go back to configuration file here, I will find such keys as API version, kind metadata and
spec same keys which are described here API version, kind metadata and spec.
And if you want to get the details about deployment spec, you could click here and you will find that
inside of the spec you have to specify selector template, replicas, strategy, mean ready seconds
and so on.
And if I have a look at this pack here, I will find out that inside of spec in this example, there
was selector and template, selector and template here and both are required.
If you click on template, you will read details about both template spec.
Let's click on it and here you will find that inside of the port template spec, you have to specify
metadata and spec, which is port spec.
And that's what we added here in the template section.
Metadata and spec for the port, let's click on port spec and read details about port specification.
Containers is required and you could add multiple containers in the port specification if you want to
do so.
And here in this spec we have containers, here it is.
Let's click on container here.
And in this container specification you will find name which is required.
That's why we set name as this.
Also, you have to set image for specific container.
Helios Image Resources and ports are also described here on this documentation page.
So here is ports section.
Also you could set, for instance, environment variables for a particular container.
I highly recommend to you to get familiar with documentation and with all options available, and I
just demonstrated to you how you could dig through documentation and find out how to fill different
sections of the configuration file.