# Definitions

Kubernetes is a tool that allows you to [run](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#run) workloads in a cluster of computers called nodes. It automates deployment, scaling and management of containerized applications \[1].

Workloads are abstracted as [Pods](https://kubernetes.io/docs/concepts/workloads/pods/), the most atomical element of the Kubernetes architecture, that can group one or more containers.

Objects in Kubernetes are typically described in yaml files. Each object has the required properties `apiVersion`, `kind`, `metadata` and `spec` \[2].

While pods can be run directly on the cluster is likely that based on the workload use case one of the following resource will be used.

When a reliable and scalable application is needed [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) and [ReplicaSet](https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/) will be used to describe the state of the application and the number of replica Pods desired. A [StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) is used when a stateful application is desired. A [DeamonSet](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) will make sure a Pod with the desired spec will be available on all nodes. For workloads that need to be executed once a [Job](https://kubernetes.io/docs/concepts/workloads/controllers/job/) is defined that allows specifying the number of completions and parallelism. Finally for workloads that need to be scheduled to run at specific time intervals a [CronJob](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) is defined.

\[1] <https://kubernetes.io/>

\[2] <https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/#required-fields>


---

# 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://devops.dovelopers.com/kubernetes/definitions.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.
