Sparta
| Secret at startup | Sparta |
| Secret on disk now | Sparta |
| App started at | 2026-12-01 05:04:39 UTC |
| Secret file path | /etc/secrets/city |
| Loaded as | Value | Updates on rotation? |
|---|---|---|
| File (volume mount) | Sparta | Yes, within ~15 min (configurable) |
Env var CITY (secretKeyRef) |
Sparta | No, only after a pod restart |
Update the secret in Vault and the file value changes without a restart.
File: the kubelet watches the Kubernetes Secret and rewrites the mounted files when it changes. The app reads the file on every request, so it sees the new value.
Env var: environment variables are copied into the process once, when the container starts. Kubernetes cannot change them in a running process, so the old value stays until the pod is restarted.