CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Administrator

Volume subPath and Mounted File Permissions

The two things that go wrong when configuration reaches a container as a file: a mount that hides the directory it landed on, and a permissions field that is decimal when everyone reads it as octal.

Storage Guide 66 of 103 Intermediate

The ..data timestamp directory name is generated per mount. Everything else here is the same on any cluster.

Four nodes, though every Pod here is a single one - nothing depends on cluster shape.
Server NameIP AddressOSRolesCPURAMHDD
CKA1001192.168.0.175Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA1001-NODE01192.168.0.176Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE02192.168.0.177Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE03192.168.0.178Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

This guide includes

Use this when a ConfigMap mount hides files the image shipped, or when a mounted Secret turns out to be readable by more than it should be. This matters because a volume mount replaces a directory rather than merging into it, and subPath fixes that at a cost people only discover later.

Before you start

  1. What the image ships in that directory

  2. Mounting a ConfigMap over it

  3. The same ConfigMap, mounted with subPath

  4. The cost of subPath, which is the part that bites

  5. File permissions on a mounted Secret

Official sources