Skip to content

Commit 1786bc5

Browse files
committed
Wrap secret usage with bash
Signed-off-by: Alex Ellis (VMware) <[email protected]>
1 parent 01cf80a commit 1786bc5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/reference/secrets.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ In Kubernetes we can leverage the [secrets api](https://kubernetes.io/docs/conce
2121
From the commandline use
2222

2323
```sh
24-
kubectl create secret generic secret-api-key --from-file=secret-api-key=~/secrets/secret_api_key.txt --namespace openfaas-fn
24+
kubectl create secret generic secret-api-key \
25+
--from-file=secret-api-key=~/secrets/secret_api_key.txt \
26+
--namespace openfaas-fn
2527
```
2628

2729
Here we have explicitly named the key of the secret value so that when it is mounted into the function container, it will be named exactly `secret-api-key` instead of `secret_api_key.txt`.
@@ -33,7 +35,8 @@ For sensitive value we can leverage the [Docker Swarm Secrets](https://docs.dock
3335
From the command line use
3436

3537
```sh
36-
docker secret create secret-api-key ~/secrets/secret_api_key.txt
38+
docker secret create secret-api-key \
39+
~/secrets/secret_api_key.txt
3740
```
3841

3942
## Use the secret in your function

0 commit comments

Comments
 (0)