Open ybelleguic opened 1 year ago
Hi @ybelleguic , I could not reproduce the error on my end. The error mountWithArgs: failed to open connection - getConnWithRetry: get token source: DefaultTokenSource: google: could not find default credentials.
indicates that the service account was not setup correctly. Could you double check the doc https://github.com/GoogleCloudPlatform/gcs-fuse-csi-driver/blob/main/docs/authentication.md and make sure the Workload Identity is setup correctly?
I have exactly the same errors from the sidecar. Does this related to the federated workload identity mentioned here? My workload identity pool has federation setup and I think Anthos probably also uses federation, that seems to be common across 3 different issues.
I tried to start a container using gcr.io/google.com/cloudsdktool/cloud-sdk:latest
with the same service account and verified I am able to list/upload/download from the GCS bucket. So service account/IAM/permissions are all setup correctly.
Hello,
workload identity was setup correctly on my side.
my problem was related to the outboundTrafficPolicy mode set in the cluster. When the mode is set to REGISTRY_ONLY
, we have to declare an istio ServiceEntry
for storage.googleapis.com and add the annotation traffic.sidecar.istio.io/excludeOutboundIPRanges: "169.254.169.254/32"
on the pods 1.
So I guess this issue can be closed ?
Ah I see, thanks @ybelleguic for the troubleshooting step!
@zhangluva , could you follow this step and retry on your side? If it helps, please let me know, and I will update the documentation. Thank you!
Thanks @songjiaxun for your quick reply. I did go though the IAM and permission settings and everything looked good. Following are my steps to verify IAM/permission.
gcr.io/google.com/cloudsdktool/cloud-sdk:latest
gcloud storage
commands against the prepared bucket
So I don't think it's an IAM permission issue. K8s service account impersonate GCP service account and then access GCS bucket all worked as expected if not using the sidecar.
Thanks,
Hello,
I'm encoutering issue when mounting a bucket as a PV with Anthos Service Mesh. Please find the following yaml at the end of the issue. It works perfectly fine when istio injection is disabled.