Skip to main content

Use secrets in Kubernetes

In his tutorial, you are going to use the secret created in Hashicorp Vault and added to Kubernetes using the Otomi Secrets feature in a Kubernetes deployment.

Add the following snippet to the hello-svc.yaml file created in the previous tutorial to the spec: section of the deployment:

- name: TARGET
name: hello

And apply the manifest to Kubernetes:

bash kubectl apply -f hello-svc.yaml

Go to<your-ip>

As you can see, the text on the page now shows the value `party people` of the secret you created in Vault.

You can do the same for the Knative service `hello-ksvc`.