This page describes how to manage your Google Distributed Cloud clusters.

## Before you begin

1. SSH into your admin workstation:

   ```
   ssh -i ~/.ssh/vsphere_workstation ubuntu@[IP_ADDRESS]
   ```
2. Log in to Google Cloud using your account credentials:

   ```
   gcloud auth login
   ```
3. 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](https://docs.cloud.google.com/resource-manager/docs/creating-managing-projects). (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](https://docs.cloud.google.com/anthos/multicluster-management/connect/viewing-registered-clusters)
in the Connect documentation.

## Connecting to your clusters

If you want to connect to your clusters, you have two options:

- You can [SSH into cluster nodes](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.6/how-to/ssh-cluster-node).
- Your user clusters are automatically [registered to your Google Cloud project](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.6/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](https://docs.cloud.google.com/anthos/multicluster-management/console/logging-in).

## Checking cluster version

### User cluster

```
kubectl get cluster --kubeconfig [USER_CLUSTER_KUBECONFIG] -o yaml | grep bundle.gke.io/version
```

The cluster's version is the same as the bundle version returned by this
command.

### Admin cluster

```
kubectl get pod -l api=clusterapi --kubeconfig [ADMIN_CLUSTER_KUBECONFIG] -o yaml -n kube-system | grep image:.*controller-manager
```

The cluster's version is the same as the image version returned by this
command.