File secret source
The file secret source loads secrets from a plain text file.
Each line in the file contains one secret in key=value format:
secret=very secret
someotherkey=another secretTo use the file secret source, specify the file path with the --secret-source flag:
k6 run --secret-source=file=secrets.file script.jsdocker run -it --rm \
  -v <SCRIPT_DIR>:/scripts \
  grafana/k6 run --secret-source=file=/scripts/secrets.file /scripts/script.jsIn the Docker example, replace <SCRIPT_DIR> with the absolute path to the directory that contains your script and secrets file.






