没有cluster级别的权限只有namespace级别权限安装tidb operator

将clusterScoped设置为false, rbac.create设置为true:

[root@localhost ~]# helm install tidb-operator ./tidb-operator
Error: rendered manifests contain a resource that already exists. Unable to continue with install: could not get information about the resource: clusterroles.rbac.authorization.k8s.io “tidb-operator:tidb-controller-manager” is forbidden: User “maozhipeng” cannot get resource “clusterroles” in API group “rbac.authorization.k8s.io” at the cluster scope

将clusterScoped设置为false, rbac.create设置为false:

[root@localhost ~]# kubectl get deployment
NAME READY UP-TO-DATE AVAILABLE AGE
tidb-controller-manager 0/1 0 0 3h1m
tidb-scheduler 0/1 0 0 3h1m

[root@localhost ~]# kubectl get pods
No resources found.

pod没有创建成功

需要将clusterScoped设置为false, rbac.create设置为 true

rbac.create设置为true会出现第一种权限不足的错误……

需要改动其他配置文件

./tidb-operator/template/apiserver-rbac.yaml中没有分if clusterScoped和if not clusterScoped的情况;./tidb-operator/template/controller-manager-rbac.yaml的逻辑似乎也有问题;

现在安装成功了吗?

没有呢…yaml文件我不太会改…lol

vi 命令编辑修改下yaml文件

我的意思是说 ./tidb-operator/template/apiserver-rbac.yaml中没有分if clusterScoped和if not clusterScoped的情况;./tidb-operator/template/controller-manager-rbac.yaml的逻辑似乎也有问题; 但是具体要怎么改正确我不会

好,等我看一下

v1.2.0 已经发布并完整支持 namespace 级别的权限安装,https://docs.pingcap.com/zh/tidb-in-kubernetes/dev/deploy-tidb-operator#在线部署-tidb-operator