【发布时间】:2019-07-28 09:50:01
【问题描述】:
我在集群上部署了 metrics-server。 pod 正在按预期运行。
kubectl get --raw "/apis/metrics.k8s.io/v1beta1/nodes
返回:
错误:您必须登录到服务器(未经授权)
metrics server pods里面的日志是这样的:
I0727 13:33:23.905320 1 serving.go:273] Generated self-signed cert (/tmp/apiserver.crt, /tmp/apiserver.key) │
│ [restful] 2019/07/27 13:33:26 log.go:33: [restful/swagger] listing is available at https://:8443/swaggerapi │
│ [restful] 2019/07/27 13:33:26 log.go:33: [restful/swagger] https://:8443/swaggerui/ is mapped to folder /swagger-ui/ │
│ I0727 13:33:26.284542 1 serve.go:96] Serving securely on [::]:8443 │
│ W0727 13:33:47.904111 1 x509.go:172] x509: subject with cn=kubernetes-proxy is not in the allowed list: [system:auth-proxy] │
│ E0727 13:33:47.904472 1 authentication.go:62] Unable to authenticate the request due to an error: [x509: subject with cn=kubernetes-proxy is not allowed, x509: certificate signed by unknown authority]
此错误消息看起来像是配置错误的 RBAC 规则,但是我的集群中没有 auth-proxy cluster-role...
cn=kubernetes-proxy 的主题不在允许列表中: [系统:身份验证代理]
这可能是某个简单的 RBAC 配置错误吗?
设置 --kubelet-insecure-tls 没有帮助
我在 Scaleway 上运行 Ubuntu 的裸机服务器上使用 k3s 版本 0.7.0
【问题讨论】:
标签: kubernetes certificate metrics rbac k3s