- 已编辑
+ envsubst
+ kubectl apply -f -
Error from server (Forbidden): error when retrieving current configuration of:
Resource: “apps/v1, Resource=deployments”, GroupVersionKind: “apps/v1, Kind=Deployment”
Name: “ttc-dev-v1”, Namespace: “ttc”
from server for: “STDIN”: deployments.apps “ttc-dev-v1” is forbidden: User “system:serviceaccount:kubesphere-devops-worker:default” cannot get resource “deployments” in API group “apps” in the namespace “ttc”
kubesphere 3.x 执行下面脚本可以,4.x执行不行,不知道怎么配置,有大佬给指点一下吗,相关资料也没找到,不知道怎么配置权限
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kubesphere-devops-worker-installer-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: ks-installer
subjects:
- kind: ServiceAccount
name: default
namespace: kubesphere-devops-worker