Log in to Google Cloud using your account credentials:
gcloud auth login
Set a default project. Setting a default Google Cloud causes all
gcloud CLI commands to run against the project, so that you don't
need to specify your project for each command:
gcloud config set project [PROJECT_ID]
Replace [PROJECT_ID] with your
project ID. (You can
find your project ID in Google Cloud console, or by running
gcloud config get-value project.)
Viewing your clusters
kubectl
kubectl get clusters --kubeconfig [ADMIN_CLUSTER_KUBECONFIG]
Console
If you chose to register your clusters with Google Cloud by populating
the gkeconnect field of the Google Distributed Cloud configuration file,
you can view your clusters in Google Cloud console. To learn more, see
Viewing registered clusters
in the Connect documentation.
Connecting to your clusters
If you want to connect to your clusters, you have two options:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eThis page provides instructions on managing Google Distributed Cloud clusters, including viewing, connecting to, and checking the version of your clusters.\u003c/p\u003e\n"],["\u003cp\u003eTo begin, users must SSH into their admin workstation, log in to Google Cloud, and set a default project ID.\u003c/p\u003e\n"],["\u003cp\u003eClusters can be viewed using \u003ccode\u003ekubectl\u003c/code\u003e commands or through the Google Cloud console if registered.\u003c/p\u003e\n"],["\u003cp\u003eYou can connect to your clusters by SSHing into cluster nodes or logging in via the Google Cloud console, as user clusters are automatically registered upon creation.\u003c/p\u003e\n"],["\u003cp\u003eCluster versions can be checked by using \u003ccode\u003ekubectl\u003c/code\u003e commands tailored for either user or admin clusters, with the output indicating the respective bundle or image version.\u003c/p\u003e\n"]]],[],null,["# Managing clusters\n\nThis page describes how to manage your Google Distributed Cloud clusters.\n\nBefore you begin\n----------------\n\n1. SSH into your admin workstation:\n\n ```\n ssh -i ~/.ssh/vsphere_workstation ubuntu@[IP_ADDRESS]\n ```\n2. Log in to Google Cloud using your account credentials:\n\n ```\n gcloud auth login\n ```\n3. Set a default project. Setting a default Google Cloud causes all\n gcloud CLI commands to run against the project, so that you don't\n need to specify your project for each command:\n\n ```\n gcloud config set project [PROJECT_ID]\n ```\n\n Replace \u003cvar translate=\"no\"\u003e[PROJECT_ID]\u003c/var\u003e with your\n [project ID](/resource-manager/docs/creating-managing-projects). (You can\n find your project ID in Google Cloud console, or by running\n `gcloud config get-value project`.)\n\nViewing your clusters\n---------------------\n\n### kubectl\n\n```\nkubectl get clusters --kubeconfig [ADMIN_CLUSTER_KUBECONFIG]\n```\n\n### Console\n\nIf you chose to register your clusters with Google Cloud by populating\nthe `gkeconnect` field of the Google Distributed Cloud configuration file,\nyou can view your clusters in Google Cloud console. To learn more, see\n[Viewing registered clusters](/anthos/multicluster-management/connect/viewing-registered-clusters)\nin the Connect documentation.\n\nConnecting to your clusters\n---------------------------\n\nIf you want to connect to your clusters, you have two options:\n\n- You can [SSH into cluster nodes](/anthos/clusters/docs/on-prem/1.7/how-to/ssh-cluster-node).\n- Your user clusters are automatically [registered to your Google Cloud project](/anthos/clusters/docs/on-prem/1.7/how-to/connecting-to-a-cluster) when you create them. This means you can view and [log in to clusters from the Google Cloud console](/anthos/multicluster-management/console/logging-in).\n\nChecking cluster version\n------------------------\n\n### User cluster\n\n```\nkubectl get cluster --kubeconfig [USER_CLUSTER_KUBECONFIG] -o yaml | grep bundle.gke.io/version\n```\n\nThe cluster's version is the same as the bundle version returned by this\ncommand.\n\n### Admin cluster\n\n```\nkubectl get pod -l api=clusterapi --kubeconfig [ADMIN_CLUSTER_KUBECONFIG] -o yaml -n kube-system | grep image:.*controller-manager\n```\n\nThe cluster's version is the same as the image version returned by this\ncommand."]]