If you’re concerned about your own software logging credentials, command line arguments are negative in two regards:
They’re highly visible when the process is running; they’re often automatically logged.
> They aren't in the environment block, so a quick and dirty "dump all my environment variables to stdout" procedure won't risk exposing them.
Okay — but the usual way that happens is “dump my config object in a log”, which parsed configs don’t help with.
You also now have a config file: how is it stored? ...is it in the repo? ...what are the permissions? ...how do we deploy it?
Environment variables don’t persist in repos and are designed to be integrated with hosting tools, like secrets managers.
I’m not seeing how a config file beats Kubernetes injecting from the secret store, which is why we use environment variables: so our tools (secret stores) can configure the environment our software uses.