# Volumes - Kubernetes
# https://kubernetes.io/docs/concepts/storage/volumes/

# An emptyDir volume is first created when a Pod is assigned to a Node, 
# and exists as long as that Pod is running on that node. 

# As the name says, it is initially empty. 

# Containers in the Pod can all read and write the same files in the emptyDir volume, 
# though that volume can be mounted at the same or different paths in each Container. 

# When a Pod is removed from a node for any reason, the data in the emptyDir is deleted forever.

apiVersion: v1
kind: Pod
metadata:
  name: test-pd
spec:
  containers:
  - image: k8s.gcr.io/test-webserver
    name: test-container
    volumeMounts:
    - mountPath: /cache
      name: cache-volume
  volumes:
  - name: cache-volume
    emptyDir: {}