Authenticating standalone gsutil in containers in Cloud ML Engine on Kubernetes with Workload Identity

后端 未结 2 2048
小蘑菇
小蘑菇 2021-01-06 16:55

I\'m launching container images on Google Cloud AI Training (Cloud ML Engine)

Inside those containers I need to use gsutil. Some containers have gsutil. In that case

相关标签:
2条回答
  • 2021-01-06 17:26

    This is because that pip install gsutil alone does not configure the credentials, which is why it's anonymous user as the error says. You'll want to configure credentials to access protected data.

    Put following line in your docker file and it should work:

    RUN echo '[GoogleCompute]\nservice_account = default' > /etc/boto.cfg

    It's to configure gsutil to use the default service account.

    0 讨论(0)
  • 2021-01-06 17:38

    Workload identity is the better way of doing the same.

    You create a relation between the Kubernetes service account and Google cloud Service account.

    https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity

    0 讨论(0)
提交回复
热议问题