Understanding YAML in-Depth!!
Basically there are three parts of Every YAML file.
- MetaData(we define it)
- spec (specifications) (we define that too)
- state(that depennds on kubernetes brain!! which is “etcd!”)
rest is version and kind, version define which API version we are going to use and kind defines the type of deployment or POD we are going to implement here/!!
When you use the Kubernetes API to create the object (either directly or via
kubectl), that API request must include that information as JSON in the request body. Most often, you provide the information to
kubectl in a .yaml file.
kubectl converts the information to JSON when making the API request.
Metadata: It helps uniquely to understand an object, in
UID, and optional
spec – What state you desire for the object
to be continued –> https://cloudplex.io/tutorial/how-to-write-yaml-files-for-kubernetes/