Open ahsan-raza opened 6 months ago
I have faced similar issue Reconciler error. Try to disable and re-enable kubernetes auth in vault server and configure and add the role and try again.
It worked for me.
@asttle Thanks for your comment and suggestion, I followed your steps, unfortunately, it did not work for me. I have deployed vault and 2 different server and also on minikube on my mac, I am facing the same issue
Hi,
We are currently facing the same problem. We've tried your solution @asttle, but some week later the problem returns and we have 4 environments facing the same problem.
No one from HashiCorp is assigned on this bug. Are there any update on this thread? Have you some information aboout it?
Thank you!
@ahsan-raza Configurations looks fine. Can you try to use a separate serviceAccount instead of using default to bind the vault and kubernetes.
@lusien88 Can you please share your configurations, so that i can have a look at it and help. Also refer to the video for setp by step implementation and check where it went wrong
Hi, same have @lusien88 with have same problem, when this bug are assignated to support Hashicorp team? Thank you !
Hello, facing the same issue here. Exact same configuration as @ahsan-raza
Thanks for support !
Describe the bug I am implementing VaultStaticSecret with VSO. VaultDynamicSecret works fine with the same service account and permissions but VaultStaticSecret gives the following error:
To Reproduce Steps to reproduce the behavior:
Deploy VSO with the following yaml file with the following VSO custom resources.
vault deployed with below values.yaml override:
VaultAuth.yml
vault write auth/kubernetes/config \ token_reviewer_jwt="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \ kubernetes_host=https://${KUBERNETES_PORT_443_TCP_ADDR}:443 \ kubernetes_ca_cert=@/var/run/secrets/kubernetes.io/serviceaccount/ca.crt \ issuer="https://kubernetes.default.svc.cluster.local"
vault secrets enable -version=2 kv-v2
vault policy write static-secret - << EOF path "kv-v2/data/ns/appname " { capabilities = ["read"] } EOF
vault write auth/kubernetes/role/ns-role \ bound_service_account_names=default \ bound_service_account_namespaces=ns \ policies=default,static-secret \ audience=vault \ ttl=24h
URL: GET https://vault.vault.svc.cluster.local:8200/v1/kv-v2/data/ns/appname Code: 403. Errors:
1 error occurred:
{"type": "Warning", "object": {"kind":"VaultStaticSecret","namespace":"ns","name":"vault-static-secret-appname","uid":"0d8fe0f4-5172-4897-9995-314b5e52e040","apiVersion":"secrets.hashicorp.com/v1beta1","resourceVersion":"1758957"}, "reason": "VaultClientError"} 2024-05-07T18:33:41Z DEBUG events Failed to read Vault secret: Error making API request.
Application deployment:
kubectl describe VaultStaticSecret
output.Expected behavior VaultStaticSecret should create a kv secret in the namespace and inject in the pod.
Environment
Additional context
I followed this guide to deploy the vault https://developer.hashicorp.com/vault/tutorials/kubernetes/kubernetes-minikube-tls
Firstly, I assumed its the problem with tls so I deployed vault without tls and still the VSO was not able to create Static Secrets but was able to create dynamic secrets.