Skip to main content
Welcome to this step-by-step guide on using the KV secrets engine version 1 in HashiCorp Vault. You will learn how to:
  • List existing secrets engines
  • Enable a KV v1 engine at a custom path
  • Verify the engine version
  • Write, read, update, and delete secrets
  • Format output as JSON and extract specific fields
  • List secret keys
All examples assume you have the Vault CLI installed, authenticated, and are connected to your Vault server via SSH.

1. List Existing Secrets Engines

Inspect which secret engines are currently mounted:
Example output:
No KV engine is enabled yet.

2. Enable KV v1 at a Custom Path

Enable a KV v1 engine at training/:
You should see:
Re-run the list command:
Now you’ll spot:

3. Verify the Engine Version

Check the detailed mount info to confirm KV v1 (no versioning):
Look for an empty Options map (map[]):
In KV v2, the options map includes "version":"2".

4. Write Secrets

Store a single key/value pair:
Expected output:

5. Read Secrets

Retrieve the secret:

6. Update Secrets

KV v1 always overwrites data. To update, write again:
Read back:
To store multiple fields at once:

7. JSON Output & Field Extraction

Output secret as JSON and parse with jq:
Sample JSON:
Extract specific fields:
Using JSON output is useful for automation and scripting.

8. Delete Secrets

Remove the secret at a given path:
Attempt to read again:

9. List Secret Keys

Re-create sample secrets:
List keys under training/:
List under training/apps/:
  • Entries ending with / are subdirectories.
  • Others are secret paths.

Summary Comparison: KV v1 vs. KV v2


Watch Video