How to Use Secrets in a Pod
Planted .
There are a few ways to use secrets with pods.
Environment variables
Use envFrom with secretRef.
Sample file:
apiVersion: v1
kind: Pod
metadata:
name: envfrom-secret
spec:
containers:
- name: envars-test-container
image: nginx
envFrom:
- secretRef:
name: test-secret