k8s 节点启动 kubelet 问题请教

2019-01-28 21:44:01 +08:00
 fanne
[root@centos7-node01 cfg]# /opt/kubernetes/bin/kubelet  --logtostderr=true --v=4 --address=192.168.248.129 --hostname-override=192.168.248.129 --kubeconfig=/opt/kubernetes/cfg/kubelet.kubeconfig --experimental-bootstrap-kubeconfig=/opt/kubernetes/cfg/bootstrap.kubeconfig --cert-dir=/opt/kubernetes/ssl --allow-privileged=true --fail-swap-on=false --cluster-dns=10.10.10.2 --cluster-domain=cluster.local --pod-infra-container-image=registry.cn-hangzhou.aliyuncs/google_containers/pause-amd64:3.0

报错信息

I0129 05:41:06.946579    6235 bootstrap.go:58] Using bootstrap kubeconfig to generate TLS client cert, key and kubeconfig file
error: failed to run Kubelet: cannot create certificate signing request: certificatesigningrequests.certificates.k8s.io is forbidden: User "kubelet-bootstrap" cannot create certificatesigningrequests.certificates.k8s.io at the cluster scope: clusterrole.rbac.authorization.k8s.io "system:node-bootstrap" not found

master 上创建角色权限

[root@centos7-master .kube]# kubectl create clusterrolebinding kubelet-bootstrap --clusterrole=system:node-bootstrapper --user=kubelet-bootstrap
Error from server (AlreadyExists): clusterrolebindings.rbac.authorization.k8s.io "kubelet-bootstrap" already exists
[root@centos7-master .kube]# kubectl describe clusterrolebinding kubelet-bootstrap                                                              
Name:           kubelet-bootstrap
Namespace:
Labels:         <none>
Events:         <none>

这个权限之前估计创建有误,但kubelet-bootstrap已占用,不知怎么修改的clusterrole这个值。

4099 次点击
所在节点    Docker
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/531380

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX