Skip to content

Commit eb0fbf2

Browse files
committed
Add envs example for secretGenerator.
1 parent 2b38c75 commit eb0fbf2

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

content/en/docs/tasks/configmap-secret/managing-secret-using-kustomize.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,19 @@ secretGenerator:
4848
- password=1f2d1e2e67df
4949
```
5050

51-
Note that in both cases, you don't need to base64 encode the values.
51+
You can also define the `secretGenerator` in the `kustomization.yaml`
52+
file by providing `.env` files.
53+
For example, the following `kustomization.yaml` file pulls in data from
54+
`.env.secret` file:
55+
56+
```yaml
57+
secretGenerator:
58+
- name: db-user-pass
59+
envs:
60+
- .env.secret
61+
```
62+
63+
Note that in all cases, you don't need to base64 encode the values.
5264

5365
## Create the Secret
5466

0 commit comments

Comments
 (0)