kelseyhightower / vault-controller

Automate the creation of unique Vault tokens for Kubernetes Pods using init containers.
Apache License 2.0
447 stars 69 forks source link

cannot unmarshal string into Go value of type main.Status #12

Open xueshanf opened 7 years ago

xueshanf commented 7 years ago

This is a test against Kubernetes 1.6.1. Had to give vault-controller RBAC role permission to list pods in the cluster. After that, I am getting the following error:

2017-04-29T00:36:13.693068057Z 2017/04/29 00:36:13 Starting vault-controller app...
2017-04-29T00:36:13.693097663Z 2017/04/29 00:36:13 Listening for token requests.
2017-04-29T00:36:21.455439182Z 2017/04/29 00:36:21 token request from 10.200.9.22:42974
2017-04-29T00:36:21.45809124Z 2017/04/29 00:36:21 error parsing pod (vault-example-lxx67) details: json: cannot unmarshal string into Go value of type main.Status

On the kube-apiserver side, the log shows:

/api/v1/namespaces/vault-example-lxx67/pods/vault-example-lxx67: (1.889456ms) 404 [[Go-http-client/1.1] 10.240.101.145:51154]

It seems the vault-controller is trying to get pod details from namespace /api/v1/namespaces/vault-example-lxx67/ instead of /api/v1/namespaces/vault-controller.

The vault-example rs looks okay in vault-controller namespace:

$ kubectl -n vault-controller get pods
NAME                     READY     STATUS     RESTARTS   AGE
vault-cgscv              1/1       Running    0          1h
vault-controller-1phqz   2/2       Running    0          7m
vault-example-lxx67      0/1       Init:0/1   0          17m

Anyone get it working with Kubernetes 1.6.1?

pycaster commented 6 years ago

Was anyone able to solve this?

Rjup commented 4 years ago

Was anyone able to solve this?

Spoorti-Gandhad commented 2 years ago

Was anybody able to resolve this issue ? I am facing it with vault 4.2.2