Skip to content

Needs to use --gke-uri instead of --gke-cluster in a multi-project scenario #837

@qingvincentyin

Description

@qingvincentyin

gcloud container hub memberships register "${MEMBERSHIP_NAME}" --gke-cluster="${CLUSTER_LOCATION}"/"${CLUSTER_NAME}" --service-account-key-file="${tmp_file}" --project="${PROJECT_ID}" --quiet

Suppose a GKE cluster resides in GKE_PROJECT_ID different from HUB_PROJECT_ID. In such a multi-project registration scenario, the command line param --gke-cluster won't work. I believe we'd have to use the --gke-uri param instead.

BTW, --project in this command refers to the HUB_PROJECT_ID. When GKE_PROJECT_ID == HUB_PROJECT_ID, this distinction isn't important. But in a multi-project registration scenario, it is better to rename ${PROJECT_ID} to ${HUB_PROJECT_ID} in order to be more clear on the concept.

Metadata

Metadata

Assignees

Labels

P3medium priority issuesbugSomething isn't workinggood first issueGood for newcomerstriagedScoped and ready for work

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions