It's too easy to accidentally destroy the default cluster
Closed this issue · 0 comments
blixtra commented
I just accidentally destroy
ed my default cluster because I mistyped the command. We should probably bail if we didn't recognize an argument.
I forgot the --cluster-name
flag. 🤷♂️
[chris@localhost kube-spawn]$ sudo ./kube-spawn destroy 3node
[sudo] password for chris:
using config from /var/lib/kube-spawn/default
destroying cluster "default"
force stopping 5 machines
"kubespawndefault3" stopped
"kubespawndefault1" stopped
"kubespawndefault2" stopped
"kubespawndefault4" stopped
"kubespawndefault0" stopped
successfully removed image "kubespawndefault4"
successfully removed image "kubespawndefault3"
successfully removed image "kubespawndefault1"
successfully removed image "kubespawndefault2"
successfully removed image "kubespawndefault0"
"default" destroyed
Doesn't seem to detect the stray argument.
Or maybe we should confirm unless a --yes
flag is provided.