-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to inject secrets in to my pod #123
Comments
KV2 backend required the You are also referring to two different paths... One with Adding a first with the commands and files to reproduce your problem could help other people to help you |
Thanks @carlosjgp. I understand the role of Here's the Kubernetes annotations that I'm trying to use to pull from ...
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-inject-secret-my-secret: "secret/data/dev/my-secret"
vault.hashicorp.com/agent-inject-template-my-secret: |
{{- with secret "secret/data/dev/my-secret" -}}
{{- range $k, $v := .Data.data }}
{{ $k }}="{{ $v }}"
{{- end }}
{{- end }}
vault.hashicorp.com/role: "hello-world"
... The annotations above will not pull the secrets from
However, it will work if I take it out from |
yeah KV2 backend is a little bit confusing to use but you don't need the secret path should be the same as with the CLI
If the commands on the CLI work it should work with the sidecar as far as the logins use the same policies/ACLs |
Okay still confused. Using Vault Here is my template
Here is the log in Vault Agent
Here is the log in Vault
Here is my policy
Here is a request using a token from that policy
and the response
|
What I have found via debugging vault is that if I create a secret with an expiry time the code check does not validate that it has expired and sets the secret return as null. Once I removed that deletion time it started to work. Will raise an issue with vault directly. |
Hi, I'm trying to inject secrets from Vault server to my pod and it always say:
[WARN] (view) vault.read(secret/data/dev/my-secret): no secret exists at secret/data/dev/my-secret (retry attempt 9 after "1m0s")
I've already added the Vault policy to secret
The annoying part is that it works when I put it outside
/data/
.I can read
/secret/my-secret
and able to inject it smoothly.Is this a bug or I'm just doing something not correct?
The text was updated successfully, but these errors were encountered: