The Cluster API uses Kubernetes custom resources and relies on the Kubernetes
Resource Model (KRM). It manages the lifecycle of clusters in a given
organization, such as installing, upgrading, and uninstalling.

To use the Cluster API, we recommend that you use the GDC console. If
your application needs to use your own libraries to call this API, use the
following example and the
[full API definition](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/cluster/v1/cluster-v1.md.txt) to build
your requests.

## Service endpoint and discovery document

The API endpoint for the Cluster API is
`https://MANAGEMENT_API_SERVER_ENDPOINT/apis/cluster.gdc.goog/v1`,
where `MANAGEMENT_API_SERVER_ENDPOINT` is the endpoint of the
Management API server.

Using the `kubectl proxy` command, you can access that URL in your browser or
with a tool such as `curl` to get the discovery document for the Cluster API.
The `kubectl proxy` command opens up a proxy to the Kubernetes API server on
your local machine. Once that command is running, you can access the document at
the following URL: `http://127.0.0.1:8001/apis/cluster.gdc.goog/v1`.

## Example Cluster resource

The following is an example of a `Cluster` object configured as a user cluster:

```yaml
apiVersion: cluster.gdc.goog/v1
kind: Cluster
metadata:
  name: user-vm-1
  namespace: platform
spec:
  clusterNetwork:
    podCIDRSize: 21
    serviceCIDRSize: 23
  initialVersion:
    kubernetesVersion: 1.27.1-gke.700
  loadBalancer:
    ingressServiceIPSize: 21
  nodePools:
  - machineTypeName: n2-standard-8-gdc
    name: worker-node-pool
    nodeCount: 3
  releaseChannel:
    channel: UNSPECIFIED
```