Kubernetes

Provide at least one use-case for each of the following volume types:

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

  • EmptyDir: You need a temporary data that you can afford to lose if the Pod is deleted. For example short-lived data required for one-time operations.
  • hostPath: You need access to paths on the host itself (like data from /sys or data generated in /var/lib)