You can use 'gcloud' command-line tool to create and manage Google Compute Engine resources.
- Set your Project as default in which you want to create Compute Engine instance
gcloud config set project your-project-id
- Create Compute Engine instance named test-instance-1 in zone us-central1-a
gcloud compute instances create test-instance-1 --zone us-central1-a
- Connect to Compute Engine instance using SSH
gcloud compute ssh --zone us-central1-a test-instance-1
- To List all instances
gcloud compute instances list
- To List instances with a label, for example - key="production" and value="paymentserver"
gcloud compute instances list --filter='labels.production:paymentserver'
Join GCP - Professional Cloud Architect Online Live Training
Learn more on Google Cloud Services
No comments:
Post a Comment