• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

GCP Change Instance Type

November 18, 2019

Here’s how to change instance types via the command line

# Set Project
gcloud config set project your-project-id
 
# Change instance type to 2 CPU 20GB memory.
gcloud compute instances set-machine-type your-server-name \
--zone us-east1-a \
--machine-type n2-custom-2-20480
 
# Change instance type to original settings.
gcloud compute instances set-machine-type your-server-name \
--zone us-east1-a \
--machine-type n2-custom-2-15360

# Set Project gcloud config set project your-project-id # Change instance type to 2 CPU 20GB memory. gcloud compute instances set-machine-type your-server-name \ --zone us-east1-a \ --machine-type n2-custom-2-20480 # Change instance type to original settings. gcloud compute instances set-machine-type your-server-name \ --zone us-east1-a \ --machine-type n2-custom-2-15360

Filed Under: Cloud Tagged With: change, gcp, google, instance, type

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023