How to remove a controller
There are multiple ways to remove a controller. This document demonstrates each, in order of severity.
A controller can be unregistered from a client with:
juju unregister <controller-name>
juju unregister aws-controller
This removes local connection information from the local client. This command does not affect the controller itself in any way.
A controllercan be destroyed with:
juju destroy-controller <controller-name>
You will always be prompted to confirm this action. Use the
-y option to override this.
As a safety measure, if there are any models (besides the ‘controller’ model) associated with the controller you will need to pass the
Additionally, if there is persistent storage in any of the controller’s models you will be prompted to either destroy or release the storage, using the
--release-storage options respectively.
juju destroy-controller -y --destroy-all-models --destroy-storage aws
kill-controller command as a last resort if the controller is not accessible for some reason.
kill-controller command deserves some attention as it is very destructive and also has exceptional behaviour modes. This command will first attempt to remove a controller and its models in an orderly fashion. That is, it will behave like
destroy-controller. If this fails, usually due the controller itself being unreachable, then the controller machine and the workload machines will be destroyed by having the client contact the backing cloud’s API directly.
Last updated 2 months ago.