Secret way to use environment variables [turn]

The container must be read by using the Volume Secret data from the file, will be somewhat cumbersome, Kubernetes Secret also supports the use of environment variables.

Pod profile examples are as follows:

Create and read Pod Secret.

Through environment variables  SECRET_USERNAME and  SECRET_PASSWORD read data to Secret success.

It should be noted that the environment variable is easy to read Secret, Secret, but can not support dynamic updates.

Secret code may be provided, the Token, private keys and other sensitive data Pod; for some non-sensitive data, such as configuration information of the application, can be used ConfigMap. The next section we learn ConfigMap.

Guess you like

Origin www.cnblogs.com/twobrother/p/11120470.html