GOOGLE_APPLICATION_CREDENTIALS 在 kubeflow 上找不到

GOOGLE_APPLICATION_CREDENTIALS cannot be found on kubeflow

我遵循 tutorial 在 GCP 上构建 kubeflow。

在最后一步,我卡在了 "Check the permissions for your training component"。

设置好这些secretName和secretMountPath之后。

kustomize edit add configmap mnist-map-training --from-literal=secretName=user-gcp-sa
kustomize edit add configmap mnist-map-training --from-literal=secretMountPath=/var/secrets

和运行

kustomize build . |kubectl apply -f -

我收到错误:

Error: field specified in var '{GOOGLE_APPLICATION_CREDENTIALS ~G_v1_ConfigMap {data.GOOGLE_APPLICATION_CREDENTIALS}}' not found in corresponding resource error: no objects passed to apply

我在本地机器的 /var/secrets 找不到我的 GOOGLE_APPLICATION_CREDENTIALS,但我认为 kubeflow 会根据这个 document 自动为我创建。

或者可能是因为我使用 "Authenticating with username and password" 来验证 kubeflow?

我在 here 找到了解决方案。

kustomize edit add configmap mnist-map-monitoring --from-literal=GOOGLE_APPLICATION_CREDENTIALS=/var/secrets/user-gcp-sa.json     

原文tutorial,缺少这个

Kubeflow kustomize 正在开发中,预计在下一个版本 v0.6.0 中成熟。