concept mount in category kubernetes

appears as: mounts, mounts, mount
Learn Kubernetes in a Month of Lunches

This is an excerpt from Manning's book Learn Kubernetes in a Month of Lunches.

Kubernetes manages this strange magic with two features of the pod spec: volumes, which make the contents of the ConfigMap available to the pod, and volume mounts which load the contents of the ConfigMap volume into a specified path in the pod container. Code listing 4.7 shows the volumes and mounts you deployed in the last exercise.

Listing 5.4 - sleep-with-hostPath-subPath.yaml, restricting mounts with sub-paths
spec:
  containers:
    - name: sleep
      image: kiamol/ch03-sleep
      volumeMounts:
        - name: node-root                 # name of the volume to mount
          mountPath: /pod-logs            # target path for the container
          subPath: var/log/pods           # source path within the volume
        - name: node-root
          mountPath: /container-logs
          subPath: var/log/containers
  volumes:
    - name: node-root
      hostPath:
        path: /
        type: Directory