Cleanup¶
Here's a script you can run to clean up your computer from all the stuff we installed during this tutorial.
macCleanup.sh
#!/bin/sh
#
# This is the cleanup script for Apple Mac OS
# Kubectl and tooling
rm -f /usr/local/bin/kubectl
rm -f /usr/local/bin/kubectl-krew
rm -f /usr/local/bin/kubie
rm -f /usr/local/bin/stern
# Kind
kind delete cluster --name dev
kind delete cluster --name stg
brew uninstall kind
# remove Minikube
minikube stop
minikube delete
rm -f /usr/local/bin/minikube
# remove brew installed files
brew uninstall kubectl
# stop Colima and remove it
colima kubernetes delete
colima stop
brew uninstall colima
brew uninstall docker
# Remove Podman
podman machine stop
podman machine rm
brew uninstall podman
brew uninstall podman-desktop
# Remove tooling
brew uninstall kubecolor/tap/kubecolor
# Remove ZSH setup
rm -f ~/.p10k.zsh
mv -f ~/.zshrc ~/.zshrc-demo
mv -f ~/.zshrc.pre-oh-my-zsh ~/.zshrc
linuxCleanup.sg
#!/bin/sh
#
# This is the cleanup script for Linux
# Kind
kind delete cluster demo
rm -f /usr/local/bin/kind
# remove Minikube
minikube stop
minikube delete
rm -f /usr/local/bin/minikube
# remove kubectl and tools
rm -f /usr/local/bin/kubectl
rm -f /usr/local/bin/kubecolor
rm -f /usr/local/bin/kubectl-krew
rm -f /usr/local/bin/kubie
# stop Colima and remove it
colima kubernetes delete
colima stop
# stop and delete Podman
# TODO
# Remove K3s
# TODO: delete the cluster and remove VMs files
/usr/local/bin/k3s-uninstall.sh
# Remove ZSH setup
rm -f ~/.p10k.zsh
mv -f ~/.zshrc ~/.zshrc-demo
mv -f ~/.zshrc.pre-oh-my-zsh ~/.zshrc