Click here to Skip to main content
15,881,687 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
pros and cons between a file symlink and an environment variable for accessing a Secret or ConfigMap (Kubernetes concepts)?

What I have tried:

As I am very new to this concept, want to know pros and cons between file symlink and environment variable for accessing a secret or config map for ASPNET CORE application
Posted
Updated 31-Mar-20 21:40pm
v2

You should probably not use either, but go for Key Storage and Retrieval - Win32 apps | Microsoft Docs[^].
 
Share this answer
 
A QA is not well suited for such kind of questions, as they require a longer post (a technical blog/article) to answer properly.

These two concepts are not new, and they are not specific to Kubernetes or containers. Symlinks are used to link files and other resources from the file system to a more central repository. On Linux, think of adding a resource to /usr/local/bin/ directory to be able to use it from the terminal. Environment variables, on the other hand, are key-value pairs that are used to get values based on the key you pass.

Passing the security credentials is always risky when being passed from symlinks, or environment variables. You should use the secure stores provided by the platform. Kubernetes has these Secret values that you must use; how it works internally, please refer to the documentation.

Distribute Credentials Securely Using Secrets - Kubernetes[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900