2017-08-29 00:19:25 +03:00
|
|
|
# Cleaning Up
|
|
|
|
|
|
|
|
In this labs you will delete the compute resources created during this tutorial.
|
|
|
|
|
|
|
|
## Compute Instances
|
|
|
|
|
2017-09-04 00:22:14 +03:00
|
|
|
Delete the controller and worker compute instances:
|
2017-08-29 00:19:25 +03:00
|
|
|
|
2017-10-26 01:38:16 +03:00
|
|
|
#### Linux & OS X
|
2017-08-29 00:19:25 +03:00
|
|
|
```
|
|
|
|
gcloud -q compute instances delete \
|
|
|
|
controller-0 controller-1 controller-2 \
|
|
|
|
worker-0 worker-1 worker-2
|
|
|
|
```
|
|
|
|
|
2017-10-26 01:38:16 +03:00
|
|
|
#### Windows
|
|
|
|
```
|
|
|
|
gcloud -q compute instances delete `
|
|
|
|
controller-0 controller-1 controller-2 `
|
|
|
|
worker-0 worker-1 worker-2
|
|
|
|
```
|
|
|
|
|
2017-08-29 00:19:25 +03:00
|
|
|
## Networking
|
|
|
|
|
|
|
|
Delete the external load balancer network resources:
|
|
|
|
|
2017-10-26 01:38:16 +03:00
|
|
|
#### Linux & OS X
|
2017-08-29 00:19:25 +03:00
|
|
|
```
|
|
|
|
gcloud -q compute forwarding-rules delete kubernetes-forwarding-rule \
|
|
|
|
--region $(gcloud config get-value compute/region)
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
gcloud -q compute target-pools delete kubernetes-target-pool
|
|
|
|
```
|
|
|
|
|
2017-10-26 01:38:16 +03:00
|
|
|
#### Windows
|
|
|
|
```
|
|
|
|
gcloud -q compute forwarding-rules delete kubernetes-forwarding-rule `
|
|
|
|
--region $(gcloud config get-value compute/region)
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
gcloud -q compute target-pools delete kubernetes-target-pool
|
|
|
|
```
|
|
|
|
|
2017-08-29 00:19:25 +03:00
|
|
|
Delete the `kubernetes-the-hard-way` static IP address:
|
|
|
|
|
|
|
|
```
|
|
|
|
gcloud -q compute addresses delete kubernetes-the-hard-way
|
|
|
|
```
|
|
|
|
|
|
|
|
Delete the `kubernetes-the-hard-way` firewall rules:
|
|
|
|
|
2017-10-26 01:38:16 +03:00
|
|
|
#### Linux & OS X
|
2017-08-29 00:19:25 +03:00
|
|
|
```
|
|
|
|
gcloud -q compute firewall-rules delete \
|
|
|
|
kubernetes-the-hard-way-allow-nginx-service \
|
|
|
|
kubernetes-the-hard-way-allow-internal \
|
2017-10-02 16:48:09 +03:00
|
|
|
kubernetes-the-hard-way-allow-external
|
2017-08-29 00:19:25 +03:00
|
|
|
```
|
|
|
|
|
2017-10-26 01:38:16 +03:00
|
|
|
#### Windows
|
|
|
|
```
|
|
|
|
gcloud -q compute firewall-rules delete `
|
|
|
|
kubernetes-the-hard-way-allow-nginx-service `
|
|
|
|
kubernetes-the-hard-way-allow-internal `
|
|
|
|
kubernetes-the-hard-way-allow-external
|
|
|
|
```
|
|
|
|
|
2017-08-29 00:19:25 +03:00
|
|
|
Delete the Pod network routes:
|
|
|
|
|
2017-10-26 01:38:16 +03:00
|
|
|
#### Linux & OS X
|
2017-08-29 00:19:25 +03:00
|
|
|
```
|
|
|
|
gcloud -q compute routes delete \
|
|
|
|
kubernetes-route-10-200-0-0-24 \
|
|
|
|
kubernetes-route-10-200-1-0-24 \
|
|
|
|
kubernetes-route-10-200-2-0-24
|
|
|
|
```
|
|
|
|
|
2017-10-26 01:38:16 +03:00
|
|
|
#### Windows
|
|
|
|
```
|
|
|
|
gcloud -q compute routes delete `
|
|
|
|
kubernetes-route-10-200-0-0-24 `
|
|
|
|
kubernetes-route-10-200-1-0-24 `
|
|
|
|
kubernetes-route-10-200-2-0-24
|
|
|
|
```
|
|
|
|
|
2017-08-29 00:19:25 +03:00
|
|
|
Delete the `kubernetes` subnet:
|
|
|
|
|
|
|
|
```
|
|
|
|
gcloud -q compute networks subnets delete kubernetes
|
|
|
|
```
|
|
|
|
|
|
|
|
Delete the `kubernetes-the-hard-way` network VPC:
|
|
|
|
|
|
|
|
```
|
|
|
|
gcloud -q compute networks delete kubernetes-the-hard-way
|
|
|
|
```
|
2017-10-26 01:38:16 +03:00
|
|
|
|
|
|
|
## CA Certificate
|
|
|
|
|
|
|
|
#### Windows
|
|
|
|
|
|
|
|
Remove the CA certificate from the Root Certificates keystore:
|
|
|
|
|
|
|
|
```
|
|
|
|
Get-ChildTtem -Path Cert:\CurrentUser\Root\ | Where-Object {
|
|
|
|
$_.Thumbprint -eq (Get-PfxCertificate .\ca.pem).Thumbprint } | Remove-Item
|
|
|
|
```
|
|
|
|
Confirm the certificate details in the confirmation dialog box, and click Yes to continue.
|