Kubernetes 尝试舵ls时,禁止出现configmaps错误
有人能解释这个错误吗?未找到k8s tiller:clusterrole.rbac.authorization.k8s.io tiller对我来说没有意义。这意味着什么 请忽略如何实际解决该错误,我只是想对其进行解释。此错误让RBAC了解有关RBAC的更多信息,请参阅 命名空间k8s tiller中的Serviceaccount k8s tiller无权在命名空间k8s tiller中列出configmaps。此外,集群中不存在Clusterrole tiller。为您的服务帐户k8s tiller创建的ClusterRoleBinding或RoleBinding包括ClusterRole tiller as roleRef。但是ClusterRole tiller不存在。此错误对于RBAC了解更多有关RBAC的信息,请参阅Kubernetes 尝试舵ls时,禁止出现configmaps错误,kubernetes,kubernetes-helm,Kubernetes,Kubernetes Helm,有人能解释这个错误吗?未找到k8s tiller:clusterrole.rbac.authorization.k8s.io tiller对我来说没有意义。这意味着什么 请忽略如何实际解决该错误,我只是想对其进行解释。此错误让RBAC了解有关RBAC的更多信息,请参阅 命名空间k8s tiller中的Serviceaccount k8s tiller无权在命名空间k8s tiller中列出configmaps。此外,集群中不存在Clusterrole tiller。为您的服务帐户k8s till
命名空间k8s tiller中的Serviceaccount k8s tiller无权在命名空间k8s tiller中列出configmaps。此外,集群中不存在Clusterrole tiller。为您的服务帐户k8s tiller创建的ClusterRoleBinding或RoleBinding包括ClusterRole tiller as roleRef。但是ClusterRole tiller不存在。我可以确认nightfury的意思,但您不需要设置K8S ClusterRole,只需要为您的命名空间部署一个tiller,并为其提供正确的角色/角色绑定和服务帐户 对于部署和历史使用,您可能更喜欢按照K8S命名空间部署一个tiller 不覆盖(例如)具有相同名称的某些部署 因此,要做到这一点: 创建SA:
Error: configmaps is forbidden: User "system:serviceaccount:k8s-tiller:k8s-tiller" cannot list configmaps in the namespace "k8s-tiller": clusterrole.rbac.authorization.k8s.io "tiller" not found
创建角色:
kubectl create sa tiller-deploy-sa
请注意,此角色不建议用于PROD,仅用于示例目的
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: <Your_namespace>
name: tiller-deploy-role
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["*"]
创建角色绑定:
kubectl apply -f <filename>.yml
应用创建的文件
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: tiller-deploy-rolebinding
namespace: <Your_namespace>
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: tiller-deploy-role
namespace: <Your_namespace>
subjects:
- kind: ServiceAccount
name: tiller-deploy-sa
namespace: <Your_namespace>
您可以使用K8S文档阅读更多内容:
我可以确认nightfury在说什么,但您不需要设置K8S Clusterrole,只需要为您的命名空间部署一个tiller,并为其提供正确的角色/角色绑定和服务帐户 对于部署和历史使用,您可能更喜欢按照K8S命名空间部署一个tiller 不覆盖(例如)具有相同名称的某些部署 因此,要做到这一点: 创建SA:
Error: configmaps is forbidden: User "system:serviceaccount:k8s-tiller:k8s-tiller" cannot list configmaps in the namespace "k8s-tiller": clusterrole.rbac.authorization.k8s.io "tiller" not found
创建角色:
kubectl create sa tiller-deploy-sa
请注意,此角色不建议用于PROD,仅用于示例目的
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: <Your_namespace>
name: tiller-deploy-role
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["*"]
创建角色绑定:
kubectl apply -f <filename>.yml
应用创建的文件
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: tiller-deploy-rolebinding
namespace: <Your_namespace>
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: tiller-deploy-role
namespace: <Your_namespace>
subjects:
- kind: ServiceAccount
name: tiller-deploy-sa
namespace: <Your_namespace>
您可以使用K8S文档阅读更多内容: