更新时间:2022-11-30 15:34:43
最后,我弄清楚出了什么问题:
Finally I have figured out what went wrong:
我的payload.json内容错误
my payload.json content was wrong
应该是这样的:
{
"kubernetes_host": "https://kubernetes",
"kubernetes_ca_cert": <kubectl exec to vault pod and cat /var/run/secrets/kubernetes.io/serviceaccount/ca.crt, now make the cert one line by following this answer: https://***.com/a/14580203/2054147>
}
现在端点下方的状态良好,并返回了client_token的愿望
Now below endpoint is working fine and returning the desire client_token
curl --request POST --data @payload2.json http://127.0.0.1:8200/v1/auth/kubernetes/login
感谢@John帮助我弄清kubernetes_host的最初问题.
Thanks @John for helping me to figure out the initial issue with kubernetes_host.