大家好,我正在尝试在我的 k8s 集群上运行 pi spark 示例。 我已经安装了 spark 操作符,拉取镜像并运行这个命令:
kubectl apply -f ./spark-pi.yaml
文档here。
当我登录驱动程序时,它给出了这个:
pkg/mod/k8s.io/client-go@v0.19.6/tools/cache/reflector.go:156: Failed to watch *v1.Pod: failed to list *v1.Pod: pods is forbidden: User "system:serviceaccount:namespace:spark-operator-spark" cannot list resource "pods" in API group "" at the cluster scope
当我运行操作员 pod 时,它给出了这个:
pkg/mod/k8s.io/client-go@v0.19.6/tools/cache/reflector.go:156: Failed to watch *v1.Pod: failed to list *v1.Pod: Unauthorized
这里是我的 ClusterRole 和 ClusterRoleBinding 的 rbac.yaml 文件(与原始舵图文件相同的文件):https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/master/charts/spark-operator-chart/templates/rbac.yaml 有什么解决办法吗?