# pod-definition.yml

Kubernetes use yml file as input to create objects such as pod, replicaSet, deployment, service.

The yml file have 4 required fields&#x20;

* **apiVersion** => Version of Kubernetes API used to create the object. For example: POD -> v1, Service -> v1, ReplicaSet -> apps/v1, Deployment -> apps/v1
* **kind** => Type of object we are trying to create (pod, replicaSet, deployment, service)
* **metadata** => Data about the object (Only two and any two that kubernetes expect like name, label, etc). For labels, you can indicate any key value pair as you wish that can be used to for pod identification and grouping. For example, "type: front-end" is for front-end pods.&#x20;
* **spec** => For info about containers and image. There is different format for different object (so check documentation)

```
kubectl create -f pod-definition.yml
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://edsonha.gitbook.io/my-gitbook/junior-to-senior-1/kubernetes/pod-definition.yml.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
