Cleaning Up

In this labs 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

Networking

Delete the external load balancer network resources:

  1. gcloud -q compute forwarding-rules delete kubernetes-forwarding-rule \
  2. --region $(gcloud config get-value compute/region)
  1. gcloud -q compute target-pools delete kubernetes-target-pool
  1. gcloud -q compute http-health-checks delete kube-apiserver-health-check

Delete the kubernetes-the-hard-way static IP address:

  1. gcloud -q compute addresses delete kubernetes-the-hard-way

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-checks

Delete the Pod network routes:

  1. gcloud -q compute routes delete \
  2. kubernetes-route-10-200-0-0-24 \
  3. kubernetes-route-10-200-1-0-24 \
  4. kubernetes-route-10-200-2-0-24

Delete the kubernetes subnet:

  1. gcloud -q compute networks subnets delete kubernetes

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

  1. gcloud -q compute networks delete kubernetes-the-hard-way