火花提交:403 错误,客户端 System:anonymous 错误

spark-submit: 403 error, client System:anonymous error

有时,当我向 Google Kubernetes 集群提交 spark 作业时,我得到 401 unauthorized,所以我这样做 gcloud container clusters get-credential my-cluster,但它几乎总是伴随着 403 错误,说客户端system:anonymous 等等,但奇怪的是,我只需要做一个简单的 kubectl get namespace,然后它又可以工作了,这是为什么?

From time to time, when I submit spark job to Google Kubernetes cluster, I got 401 unauthorized

您的凭据过期。

I do this gcloud container clusters get-credential my-cluster, but it almost always followed by 403 error, saying client system:anonymous etc.

听起来像是一个时间问题,您的新凭证会在集群中传播。