gcloud commands hang

The hang or not working commands in gcloud that I have encountered.

Dated: 11th March, 2021

Context: https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster

gcloud container hub memberships register $REMOTE_CLUSTER_NAME \
> --context=$REMOTE_CLUSTER_NAME \
> --service-account-key-file=$GKE_SA_CREDS \
> --project=$PROJECT

This command did hang. I tried to REGISTER via UI.

Checklist

  • gkeconnect.googleapis.com is enabled

  • Tried via UI

  • Tried via cloud shell

Troubleshoot

.https://cloud.google.com/anthos/multicluster-management/connect/overview

GKE Connect Agent is Enabled