A Kubernetes subPath secret mount can outlive credential rotation
Kubernetes can update a Secret mounted as a volume while a Pod is running. The update is eventual, and the application must read the changed file. The behavior changes when the Secret is mounted with subPath . Kubernetes documents that a container using a Secret as a subPath volume mount does not receive automated Secret updates. A rotation process that updates the Secret object and waits for kubelet can therefore leave the application using the old credential indefinitely.
This matters when the old credential is a database password, API token, signing key, or webhook secret. Revoking the old value at the provider may break the application. Leaving it valid preserves the risk that prompted the rotation.…