You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cloud Environment (please complete the following information):
Cloud Provider [AWS]
Actual behavior:
There is only one container named 'app'.
[ec2-user@ec2-xx-xx-xx-xx ~]$ kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
default devwebapp-xx-xx 1/1 Running 0 5s
Neither vault-agent-init nor vault-agent containers exist.
There is no possibility to inject secrets.
[ec2-user@ec2-xx-xx-xx-xx ~]$ kubectl logs devwebapp-xx-xx -c vault-agent-init
error: container vault-agent-init is not valid for pod devwebapp-xx-xx
[ec2-user@ec2-xx-xx-xx-xx ~]$ kubectl logs devwebapp-xx-xx -c vault-agent
error: container vault-agent is not valid for pod devwebapp-xx-xx
Additional context
Apiserver logs showing the issue:
I0723 13:46:14.698896 1 trace.go:116] Trace: "Call mutating webhook" configuration:vault-agent-injector-cfg,webhook:vault.hashicorp.com,resource:/v1, Resource=pods,subresource:,operation:CREATE,UID:xxx (started: 2020-07-23 13:45:44.698698084 +0000 UTC m=+5802.412268297) (total time: 30.000155842s):
Trace: [30.000155842s] [30.000155842s] END
W0723 13:46:14.698966 1 dispatcher.go:168] Failed calling webhook, failing open vault.hashicorp.com: failed calling webhook "vault.hashicorp.com": Post https://vault-agent-injector-svc.vault.svc:443/mutate?timeout=30s: context deadline exceeded
E0723 13:46:14.698984 1 dispatcher.go:169] failed calling webhook "vault.hashicorp.com": Post https://vault-agent-injector-svc.vault.svc:443/mutate?timeout=30s: context deadline exceeded
I0723 13:46:14.702704 1 trace.go:116] Trace: "Create" url:/api/v1/namespaces/default/pods,user-agent:kube-controller-manager/v1.17.7 (linux/amd64) kubernetes/b445510/system:serviceaccount:kube-system:replicaset-controller,client:10.1.2.210 (started: 2020-07-23 13:45:44.693306426 +0000 UTC m=+5802.406876613) (total time: 30.00934833s):
Trace: [30.005736493s] [30.005653171s] About to store object in database
I also tested with tls disabled.
Exactly the same two configurations AWS/RHEL/flannel and AWS/RHEL/canaldo not work properly.
Describe the bug
Cannot inject Vault secrets into Kubernetes pods in the following configurations:
- AWS/RHEL/flannel
- AWS/RHEL/canal
To Reproduce
Steps to reproduce the bug:
vault login
vault kv put secret/devwebapp/config username='test' password='test'
vault-agent-init
:kubectl logs devwebapp-xxx-xxx -c vault-agent-init
kubectl exec devwebapp-xxx-xxx -c app -- cat /vault/secrets/credentials.txt
Expected behavior
The secrets have been injected properly into the pod and are accessible from within the pod.
Config files
Configuration that should be included in the yaml file:
OS (please complete the following information):
Cloud Environment (please complete the following information):
Actual behavior:
There is only one container named 'app'.
Neither vault-agent-init nor vault-agent containers exist.
There is no possibility to inject secrets.
Additional context
Apiserver logs showing the issue:
I also tested with tls disabled.
Exactly the same two configurations
AWS/RHEL/flannel
andAWS/RHEL/canal
do not work properly.Originally posted by @przemyslavic in #1398 (comment)
The text was updated successfully, but these errors were encountered: