Resize a Standard cluster  |  Google Kubernetes Engine (GKE)  |  Google Cloud (2024)

  • Home
  • Google Kubernetes Engine (GKE)
  • Documentation
  • Guides
Stay organized with collections Save and categorize content based on your preferences.

Standard

This page explains how to manually resize Google Kubernetes Engine (GKE)Standard clusters. You can resize a cluster to increase or decrease thenumber of nodes in that cluster. Alternatively, you can autoscaleyour cluster, where GKE automatically resizes your node pools inresponse to changing conditions, such as changes in your workloads and resourceusage.

These instructions don't apply to GKEAutopilotclusters, which automatically resize based on the number of Pods in the cluster.

When you add or remove nodes in your cluster, GKE adds or removesthe associated virtual machine (VM) instances from the underlyingCompute Engine Managed Instance Groups(MIGs) provisioned foryour node pools. For removing nodes, do not use kubectl delete node as thisdoes not delete the Compute Engine VM instance in the node pool's underlyingMIG. Use cluster autoscaler or manually decrease the size of yourcluster.

Before you begin

Before you start, make sure you have performed the following tasks:

  • Enable the Google Kubernetes Engine API.
  • Enable Google Kubernetes Engine API
  • If you want to use the Google Cloud CLI for this task, install and then initialize the gcloud CLI. If you previously installed the gcloud CLI, get the latest version by running gcloud components update.

Increase the size of your cluster

When you increase the size of a cluster, the following changes occur:

gcloud

To increase the size of a cluster's node pools, run the gcloud container clusters resize command:

gcloud container clusters resize CLUSTER_NAME --node-pool POOL_NAME \ --num-nodes NUM_NODES

Replace the following:

  • CLUSTER_NAME: the name of the cluster to resize.
  • POOL_NAME: the name of the node pool to resize.
  • NUM_NODES: the number of nodes in the pool in azonal cluster. If you use multi-zonal or regional clusters,NUM_NODES is the number of nodes for each zone thenode pools is in.

Repeat this command for each node pool. If your cluster has only one nodepool, omit the --node-pool flag.

Console

To increase the size of a cluster's node pools, perform the following steps:

  1. Go to the Google Kubernetes Engine page in the Google Cloud console.

    Go to Google Kubernetes Engine

  2. Beside the cluster you want to edit, click more_vertActions, then click Edit.

  3. Click the Nodes tab next to the Details tab.

  4. In the Node Pools section, click the name of the node pool that youwant to increase in size.

  5. Click edit Resize.

  6. In the Number of nodes field, enter how many nodes that you want inthe node pool, and then click Resize.

  7. Repeat for each node pool as needed.

Decrease the size of your cluster

When you decrease the size of a cluster, the following changes occur:

  • GKE gracefully terminates nodes that are being deleted, usingthe drain process to remove the Pods from the instance. PodDisruptionBudget and terminationGracePeriodSeconds are both respected for up to one hour.
  • Pods managed by a replication controller are rescheduled by the controllerto run on the remaining instances.
  • Pods not managed by a replication controller are not restarted.

The MIG does not differentiate between instances runningPods and instances without Pods. Resizing down removes instances at random.

To learn how to add node pools and to manage existing ones, refer toAdding and managing node pools.

gcloud

To decrease the size of a cluster's node pools, run the gcloud container clusters resize command:

gcloud container clusters resize CLUSTER_NAME --node-pool POOL_NAME \ --num-nodes NUM_NODES

Replace the following:

  • CLUSTER_NAME: the name of the cluster to resize.
  • POOL_NAME: the name of the node pool to resize.
  • NUM_NODES: the number of nodes in the pool in azonal cluster. If you use multi-zonal or regional clusters,NUM_NODES is the number of nodes for each zone thenode pools is in.

Repeat this command for each node pool. If your cluster has only one nodepool, omit the --node-pool flag.

Console

To decrease the size of a cluster's node pools, perform the following steps:

  1. Go to the Google Kubernetes Engine page in the Google Cloud console.

    Go to Google Kubernetes Engine

  2. Beside the cluster you want to edit, click more_vertActions, then click Edit.

  3. Click the Nodes tab next to the Details tab.

  4. In the Node Pools section, click the name of the node pool that youwant to decrease in size.

  5. Click edit Resize.

  6. In the Number of nodes field, enter how many nodes that you want inthe node pool, and then click Resize.

  7. Repeat for each node pool as needed.

Autoscaling a cluster

GKE's cluster autoscaler feature automatically resizesyour node pools in response to changing conditions, such as changes in yourworkloads and resource usage.

To learn more about how autoscaling works, refer to the cluster autoscalerdocumentation. To set up autoscaling for your cluster, seeAutoscaling a cluster.

What's next

  • Learn more about clusters.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-09-10 UTC.

Resize a Standard cluster  |  Google Kubernetes Engine (GKE)  |  Google Cloud (2024)
Top Articles
CMC Markets Review Australia: Pros, Cons, Fees & Verdict
Is project management becoming obsolete?
Mchoul Funeral Home Of Fishkill Inc. Services
Bleak Faith: Forsaken – im Test (PS5)
The 10 Best Restaurants In Freiburg Germany
Summit County Juvenile Court
Get train & bus departures - Android
Midway Antique Mall Consignor Access
fltimes.com | Finger Lakes Times
Sams Gas Price Fairview Heights Il
Best Restaurants Ventnor
How to watch free movies online
New Mexico Craigslist Cars And Trucks - By Owner
Labor Gigs On Craigslist
Nwi Arrests Lake County
Craigslist Farm And Garden Tallahassee Florida
Price Of Gas At Sam's
Dr Adj Redist Cadv Prin Amex Charge
Chastity Brainwash
Kürtçe Doğum Günü Sözleri
Comics Valley In Hindi
Lowe's Garden Fence Roll
Cta Bus Tracker 77
10 Fun Things to Do in Elk Grove, CA | Explore Elk Grove
Www Craigslist Com Bakersfield
Heart and Vascular Clinic in Monticello - North Memorial Health
Spn 520211
Www.patientnotebook/Atic
Holiday Gift Bearer In Egypt
Craigslist Battle Ground Washington
Cylinder Head Bolt Torque Values
Orange Park Dog Racing Results
How rich were the McCallisters in 'Home Alone'? Family's income unveiled
FSA Award Package
417-990-0201
Renfield Showtimes Near Marquee Cinemas - Wakefield 12
Frommer's Belgium, Holland and Luxembourg (Frommer's Complete Guides) - PDF Free Download
Truis Bank Near Me
Blackstone Launchpad Ucf
Hair Love Salon Bradley Beach
Santa Cruz California Craigslist
Stanford Medicine scientists pinpoint COVID-19 virus’s entry and exit ports inside our noses
Koninklijk Theater Tuschinski
Felix Mallard Lpsg
Google Flights Orlando
Craigslist Freeport Illinois
Hkx File Compatibility Check Skyrim/Sse
15 Best Places to Visit in the Northeast During Summer
Joy Taylor Nip Slip
Diario Las Americas Rentas Hialeah
Strawberry Lake Nd Cabins For Sale
Land of Samurai: One Piece’s Wano Kuni Arc Explained
Latest Posts
Article information

Author: Jonah Leffler

Last Updated:

Views: 5371

Rating: 4.4 / 5 (45 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Jonah Leffler

Birthday: 1997-10-27

Address: 8987 Kieth Ports, Luettgenland, CT 54657-9808

Phone: +2611128251586

Job: Mining Supervisor

Hobby: Worldbuilding, Electronics, Amateur radio, Skiing, Cycling, Jogging, Taxidermy

Introduction: My name is Jonah Leffler, I am a determined, faithful, outstanding, inexpensive, cheerful, determined, smiling person who loves writing and wants to share my knowledge and understanding with you.