Skip to content

Commit

Permalink
Improve default cpu node pool configuration (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
Obliviour authored Nov 22, 2023
1 parent 5246bf2 commit 751d708
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ cleanup with a `Cluster Delete`.

## Cluster Create

The cluster created is a regional cluster to enable the GKE control plane across
all zones.

* Cluster Create (provision reserved capacity):

```shell
Expand Down
10 changes: 6 additions & 4 deletions xpk.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,11 +696,13 @@ def run_gke_cluster_create_command(args) -> int:
0 if successful and 1 otherwise.
"""

# Create the cluster.
# Create the regional cluster with one CPU nodepool in the requested zone.
# Set the number of cpu nodes to start a 1 and auto-scale to fit the need.
command = (
'gcloud beta container clusters create'
f' {args.cluster} --release-channel rapid --enable-autoscaling'
' --max-nodes 1000 --min-nodes 5'
f' {args.cluster} --release-channel rapid --enable-autoscaling'
f' --max-nodes 1000 --min-nodes 1 --node-locations={args.zone}'
' --num-nodes=1'
f' --project={args.project} --region={zone_to_region(args.zone)}'
f' --cluster-version={args.gke_version} --location-policy=BALANCED'
f' --machine-type={args.cluster_cpu_machine_type}'
Expand Down Expand Up @@ -1879,7 +1881,7 @@ def directory_path_type(value):
cluster_create_optional_arguments.add_argument(
'--cluster-cpu-machine-type',
type=str,
default='e2-standard-32',
default='e2-standard-4',
help=(
'Set the machine tpu within the default cpu node pool. For zonal '
'clusters, make sure that the zone supports the machine type, and for '
Expand Down

0 comments on commit 751d708

Please sign in to comment.