Adapt cleaning for Proxmox

pull/582/head
Nemo 2020-06-20 16:08:36 +02:00
parent 335243110e
commit 1af4017cde
1 changed files with 11 additions and 46 deletions

View File

@ -1,56 +1,21 @@
# Cleaning Up # Cleaning Up
In this lab you will delete the compute resources created during this tutorial. In this lab you will delete the resources created during this tutorial.
## Compute Instances ## Virtual Machines
Delete the controller and worker compute instances: Stop the 7 VM created for this tutorial:
```bash ```bash
gcloud -q compute instances delete \ sudo shutdown -h now
controller-0 controller-1 controller-2 \ ```
worker-0 worker-1 worker-2 \
--zone $(gcloud config get-value compute/zone) Delete all the VMs via the Proxmox WebUI or the Proxmox CLI (on the hypervisor):
```bash
sudo qm destroy <vmid> --purge
``` ```
## Networking ## Networking
Delete the external load balancer network resources: Delete the private Kubernetes network (`vmbr8`) via the Proxmox WebUI (to avoid fatal misconfiguration).
```bash
{
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
gcloud -q compute http-health-checks delete kubernetes
gcloud -q compute addresses delete kubernetes-the-hard-way
}
```
Delete the `kubernetes-the-hard-way` firewall rules:
```bash
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 \
kubernetes-the-hard-way-allow-health-check
```
Delete the `kubernetes-the-hard-way` network VPC:
```bash
{
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
gcloud -q compute networks subnets delete kubernetes
gcloud -q compute networks delete kubernetes-the-hard-way
}
```