# Cluster

{% hint style="info" %}
These examples assume that linked resources (Network, Subnetwork) already exist in the same environment.
{% endhint %}

## Zonal cluster with DEFAULT node pool

```yaml
resources:
  - type: container.v1.cluster
    name: gke-zonal-default
    props:
      location: us-central1-a
      initial_node_count: 1

      node_config:
        machine_type: e2-medium
        oauth_scopes:
          - https://www.googleapis.com/auth/cloud-platform

      network: default
      subnetwork: default
```

### Example plan output

```
gke-zonal-default (action: create, monthly: $101.46, change: +100%)
  => Management fee (standard) (price: $0.1/Hr, hours: 730, monthly: $73.00)
  => Management fee (extended) (price: $0.5/Hr, hours: 730, monthly: $365.00)
  => Node pool (e2-medium) (node-monthly: $28.46, count: 1, monthly: $28.46)
    => Compute (vCPU) (price: $0.02181/vCPU/Hr, quantity: 1.0, hours: 730, monthly: $15.92)
    => Compute (RAM) (price: $0.00292/GB/Hr, quantity: 4, hours: 730, monthly: $8.54)
    => Boot disk (100GB pd-standard) (monthly: $4.00)
      => Storage (price: $0.04/GiB/Mo, quantity: 100, monthly: $4.00)
```

## Zonal cluster with EXPLICIT node pool

```yaml
resources:
  - type: container.v1.cluster
    name: gke-zonal-explicit
    props:
      location: us-central1-a
      initial_node_count: 1
      remove_default_node_pool: true

      network: default
      subnetwork: default

  - type: container.v1.node_pool
    name: gke-zonal-explicit-pool1
    props:
      location: us-central1-a
      cluster: ref:gke-zonal-explicit
      initial_node_count: 2

      node_config:
        machine_type: e2-medium
        oauth_scopes:
          - https://www.googleapis.com/auth/cloud-platform
```

### Example plan output

```
gke-zonal-explicit (action: create, monthly: $73.00, change: +100%)
  => Management fee (standard) (price: $0.1/Hr, hours: 730, monthly: $73.00)
  => Management fee (extended) (price: $0.5/Hr, hours: 730, monthly: $365.00)
gke-zonal-explicit-pool1 (action: create, monthly: $56.92, change: +100%)
  => Node pool (e2-medium) (node-monthly: $28.46, count: 2, monthly: $56.92)
    => Compute (vCPU) (price: $0.02181/vCPU/Hr, quantity: 1.0, hours: 730, monthly: $15.92)
    => Compute (RAM) (price: $0.00292/GB/Hr, quantity: 4, hours: 730, monthly: $8.54)
    => Boot disk (100GB pd-standard) (monthly: $4.00)
      => Storage (price: $0.04/GiB/Mo, quantity: 100, monthly: $4.00)
```

## REGIONAL cluster with DEFAULT node pool

```yaml
resources:
  - type: container.v1.cluster
    name: gke-regional-default
    props:
      location: us-central1
      initial_node_count: 4

      node_config:
        machine_type: e2-medium
        oauth_scopes:
          - https://www.googleapis.com/auth/cloud-platform

      network: default
      subnetwork: default
```

### Example plan output

```
gke-regional-default (action: create, monthly: $186.84, change: +100%)
  => Management fee (standard) (price: $0.1/Hr, hours: 730, monthly: $73.00)
  => Management fee (extended) (price: $0.5/Hr, hours: 730, monthly: $365.00)
  => Node pool (e2-medium) (node-monthly: $28.46, count: 4, monthly: $113.84)
    => Compute (vCPU) (price: $0.02181/vCPU/Hr, quantity: 1.0, hours: 730, monthly: $15.92)
    => Compute (RAM) (price: $0.00292/GB/Hr, quantity: 4, hours: 730, monthly: $8.54)
    => Boot disk (100GB pd-standard) (monthly: $4.00)
      => Storage (price: $0.04/GiB/Mo, quantity: 100, monthly: $4.00)
```

{% hint style="info" %}
**Management fees:** Two management fee dimensions are shown:

* **Management fee (standard)** — $0.10/hour. Included in the total monthly cost.
* **Management fee (extended)** — $0.50/hour. Shown for reference but **not included** in the total monthly cost.

**Hours display:** Hourly-charged dimensions show `hours` representing the actual number of hours in the target month.
{% endhint %}
