In this guide, you’ll explore how to enable and manage the Key/Value (KV) version 1 secrets engine in HashiCorp Vault. You will learn to list existing secrets engines, mount a new KV engine, perform CRUD operations on secrets, and filter JSON output withDocumentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
jq.
1. List Enabled Secrets Engines
Run the following command to see which secrets engines are mounted:| Path | Type | Accessor | Description |
|---|---|---|---|
| cubbyhole/ | cubbyhole | cubbyhole_9c6c2ca2 | Per-token private secret storage |
| identity/ | identity | identity_e55fbf01 | Identity store |
| sys/ | system | system_ae43616e | System endpoints for control, policy, and debugging |
| transit/ | transit | transit_5bb3af5e | n/a |
2. Enable a KV Version 1 Secrets Engine
By default,kv enables version 1. Mount it at the path training:
| Path | Type | Accessor | Description |
|---|---|---|---|
| training/ | kv | kv_1d131683 | n/a |
| … | … | … | … |
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:
| Keys |
|---|
| azuredevops/ |
| jenkins/ |
| Keys |
|---|
| azuredevops |
| jenkins |
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