jq.
1. List Enabled Secrets Engines
Run the following command to see which secrets engines are mounted:2. Enable a KV Version 1 Secrets Engine
By default,kv enables version 1. Mount it at the path training:
If you need KV version 2 (with versioning, metadata, and rollback), use
-version=2.3. Verify the Engine Version
Use--detailed to confirm the KV engine version:
Options map (map[]), which indicates KV v1:
4. Write and Read Secrets
Write a secret attraining/apps/jenkins:
5. Update Secrets
Writing to the same path replaces existing data:6. Write Multiple Key/Value Pairs
You can include several pairs in one command:7. Filter JSON Output with jq
Retrieve secret data in JSON:8. Delete Secrets
In KV v1, deleting a secret permanently removes it—no version history is kept.
9. List Keys in a Path
First, add a couple of secrets:training/apps:
To list only data keys (no trailing slash):
Conclusion
You’ve now learned how to:- Mount the KV version 1 secrets engine
- Write, read, update, and delete secrets
- List secrets and filter JSON output