Now that we have finished smoke testing the cluster, it is a good idea to clean up the objects that we created for testing. In this lesson, we will spend a moment removing the objects that were created in our cluster in order to perform the smoke testing.
For this lesson, you will need to connect to cluster using
kubectl. You can log in to one of your controller servers and use it there, or you can use it from your local machine. To use
kubectl from your local machine, you will need to open an SSH tunnel. You can open the SSH tunnel by running this in a separate terminal. Leave the session open while you are working to keep the tunnel active:
ssh -L 6443:localhost:6443 user@<your Load balancer cloud server public IP>
You can clean up the objects that were created for smoke testing purposes like so:
kubectl delete secret kubernetes-the-hard-way kubectl delete svc nginx kubectl delete deployment nginx kubectl delete pod untrusted