Setting postgres environmental variables running image

As the documentation shows, you should be setting the env vars when doing a docker run like the following:

docker run --name some-postgres -e POSTGRES_PASSWORD='foo' POSTGRES_USER='bar'

This sets the superuser and password to access the database instead of the defaults of POSTGRES_PASSWORD='' and POSTGRES_USER='postgres'.

However, I’m using Skaffold to spin pup a k8s cluster and I’m trying to figure out how to do something similar. How does one go about doing this for Kubernetes and Skaffold?

Source: StackOverflow