p:: gcloud

PROJECT_ID=adithya321
ZONE=us-central1-a
docker run --rm --volumes-from \
    gcloud-config gcr.io/google.com/cloudsdktool/cloud-sdk \
    gcloud compute instances delete instance-1 \
    --project $PROJECT_ID \
    --zone=$ZONE
The following instances will be deleted. Any attached disks configured
 to be auto-deleted will be deleted unless they are attached to any
other instances or the `--keep-disks` flag is given and specifies them
 for keeping. Deleting a disk is irreversible and any data on the disk
 will be lost.
 - [instance-1] in [us-central1-a]
 
Do you want to continue (Y/n)?  y
 
Deleted [https://www.googleapis.com/compute/v1/projects/adithya321/zones/us-central1-a/instances/instance-1].

List compute instances

p:: gcloud

PROJECT_ID=adithya321
docker run --rm --volumes-from \
    gcloud-config gcr.io/google.com/cloudsdktool/cloud-sdk \
    gcloud compute instances list --project $PROJECT_ID
NAME        ZONE           MACHINE_TYPE  PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP   STATUS
instance-1  us-central1-a  e2-medium                  10.128.0.4   35.202.2.145  RUNNING
Link to original