Kubectl代理显示由未知权限签名的证书

时间:2017-12-22 09:05:43

标签: proxy kubernetes kubectl

问题

使用节点的特定IP启动 kubectl代理时, http:代理错误:x509:由未知权限签署的证书的原因是什么?

kubectl proxy --port=8001 --address=172.31.0.16 --accept-hosts='172.31.0.16'

I1222 09:00:03.471836   16775 logs.go:41] http: proxy error: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")

1 个答案:

答案 0 :(得分:8)

找到原因。以下没有执行过。

export KUBECONFIG=/etc/kubernetes/admin.conf