Cleaning Up

In this lab you will delete the compute resources created during this tutorial.

Compute Instances

Delete the controller and worker compute instances:

  1. gcloud -q compute instances delete \
  2. controller-0 controller-1 controller-2 \
  3. worker-0 worker-1 worker-2 \
  4. --zone $(gcloud config get-value compute/zone)

Networking

Delete the external load balancer network resources:

  1. {
  2. gcloud -q compute forwarding-rules delete kubernetes-forwarding-rule \
  3. --region $(gcloud config get-value compute/region)
  4. gcloud -q compute target-pools delete kubernetes-target-pool
  5. gcloud -q compute http-health-checks delete kubernetes
  6. gcloud -q compute addresses delete kubernetes-the-hard-way
  7. }

Delete the kubernetes-the-hard-way firewall rules:

  1. gcloud -q compute firewall-rules delete \
  2. kubernetes-the-hard-way-allow-nginx-service \
  3. kubernetes-the-hard-way-allow-internal \
  4. kubernetes-the-hard-way-allow-external \
  5. kubernetes-the-hard-way-allow-health-check

Delete the kubernetes-the-hard-way network VPC:

  1. {
  2. gcloud -q compute routes delete \
  3. kubernetes-route-10-200-0-0-24 \
  4. kubernetes-route-10-200-1-0-24 \
  5. kubernetes-route-10-200-2-0-24
  6. gcloud -q compute networks subnets delete kubernetes
  7. gcloud -q compute networks delete kubernetes-the-hard-way
  8. }