A [[Kubernetes]] manifest is a [[YAML]] file that contains [[Declarative]] information about an element of a Kubernetes cluster. ## Simple sample manifest ```yaml apiVersion: apps/v1 kind: Deployment metadata: labels: io.kompose.service: app name: app spec: replicas: 3 selector: matchLabels: io.kompose.service: app strategy: {} template: metadata: labels: io.kompose.service: app spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchExpressions: - key: io.kompose.service operator: In values: - app topologyKey: "kubernetes.io/hostname" containers: - image: nvanderhoeven/pokeapi_app name: pokeapi-app imagePullPolicy: Always restartPolicy: Always ``` This manifest is taken from [my PokéAPI repository](https://github.com/nicolevanderhoeven/pokeapi/blob/master/app-deployment.yaml). ## Replicas Set the number of replicas a pod must have: ```yaml ... spec: replicas: 3 ``` ## Anti-affinity Affinity defines a set of rules relating to the location of other pods. Kubernetes takes these rules into account when starting a pod.