In this section, you can learn how to create a test secret in Deckhouse Stronghold, verify its contents, and change its value if needed.

This example uses:

If your installation uses a different mount path, replace secret with the path provided by the administrator.

Use only test values in this example. Do not store real passwords, tokens, or keys in test secrets.

To create a test secret, follow these steps:

  1. Create a secret by writing test values to the selected path:

    • Stronghold in DKP
    • Stronghold in Linux
    d8 stronghold kv put secret/my-first-secret username=demo password=secret123
    stronghold kv put secret/my-first-secret username=demo password=secret123
  2. Verify the saved values:

    • Stronghold in DKP
    • Stronghold in Linux
    d8 stronghold kv get secret/my-first-secret
    stronghold kv get secret/my-first-secret

    Example output:

    ====== Data ======
    Key         Value
    ---         -----
    password    secret123
    username    demo
  3. Edit the secret value by rewriting it to the same path:

    • Stronghold in DKP
    • Stronghold in Linux
    d8 stronghold kv put secret/my-first-secret username=demo password=new-secret
    stronghold kv put secret/my-first-secret username=demo password=new-secret
  4. Make sure the value has been updated:

    • Stronghold in DKP
    • Stronghold in Linux
    d8 stronghold kv get secret/my-first-secret
    stronghold kv get secret/my-first-secret

After verification, replace the test path and values with the parameters used in your project.