How to efficiently manage authentication in Kubernetes secrets without repetition? #5557
-
|
Hi team, I’m using Is there a recommended way to avoid this repetition? Thanks in advance for any guidance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You don’t necessarily need to repeat the authentication part for every Kubernetes secret. A common approach is to use a single central Secret or ConfigMap that stores the shared authentication information, then reference it in multiple places using Kubernetes features like envFrom or secretKeyRef. For example: Then in your pod/deployment: This way, you only store the auth info once and can inject it wherever needed. Infisical’s Kubernetes integration supports this pattern, so you can keep your deployments DRY (Don’t Repeat Yourself) and maintainable. hope that it helps! |
Beta Was this translation helpful? Give feedback.
You don’t necessarily need to repeat the authentication part for every Kubernetes secret. A common approach is to use a single central Secret or ConfigMap that stores the shared authentication information, then reference it in multiple places using Kubernetes features like envFrom or secretKeyRef.
For example:
Then in your pod/deployment:
This way, you only store the auth info once and can inject it wherever needed. Infisical’s Kubernetes integration suppo…