Menu
Open source

File

You can use this secret source to load secrets from a key=value pair file as in:

bash
$ k6 run --secret-source=file=secrets.file script.js
docker
$ docker run -it --rm \
    -v <scriptdir>:/scripts \
    grafana/k6 run --secret-source=file=/scripts/secrets.file /scripts/script.js