Study. uk . com
  1. Home
  2. All questions
  3. Question 840

CKA study material · question 840 of 1000

A hostPath volume of /mnt is mounted read-only into a container, but a tmpfs mounted at /mnt/data on the host is writable inside. Why?

  1. tmpfs mounts ignore the read-only flag
  2. The container is privileged, which overrides readOnly
  3. On Linux a read-only mount is not recursive by default
  4. mountPropagation was set to Bidirectional
Show the answer

Answer: C. On Linux a read-only mount is not recursive by default

A read-only mount does not by default cover filesystems mounted beneath it, so a submount can remain writable; recursiveReadOnly is what closes that gap.

Source: Volumes (Kubernetes) — Read-only mounts

Challenge yourself on this topic → Study as cards