This topic describes how to uninstall MKE from your cluster. After uninstalling MKE, your instances of MCR will continue running in swarm mode and your applications will run normally. You will not, however, be able to do the following unless you reinstall MKE:
Enforce role-based access control (RBAC) to the cluster.
Monitor and manage the cluster from a central place.
Join new nodes using
docker swarm join.
You cannot join new nodes to your cluster after uninstalling MKE because your cluster will be in swarm mode, and swarm mode relies on MKE to provide the CA certificates that allow nodes to communicate with each other. After the certificates expire, the nodes will not be able to communicate at all. Either reinstall MKE before the certificates expire, or disable swarm mode by running
docker swarm leave --forceon every node.
To uninstall MKE:
Log in to a manager node using SSH.
Run the uninstall-ucp command in interactive mode, thus prompting you for the necessary configuration values:
docker container run --rm -it \ -v /var/run/docker.sock:/var/run/docker.sock \ --name ucp \ mirantis/ucp:3.5.0 uninstall-ucp --interactive
The uninstall-ucp command completely removes MKE from every node in the cluster. You do not need to run the command from multiple nodes.
If the uninstall-ucp command fails, manually uninstall MKE:
On any manager node, remove the remaining MKE services:
docker service rm $(docker service ls -f name=ucp- -q)
On each manager node, remove the remaining MKE containers:
docker container rm -f $(docker container ps -a -f name=ucp- -f name=k8s_ -q)
On each manager node, remove the remaining MKE volumes:
docker volume rm $(docker volume ls -f name=ucp -q)
Optional. Delete the MKE configuration:
docker container run --rm -it \ -v /var/run/docker.sock:/var/run/docker.sock \ --name ucp \ mirantis/ucp:3.5.0 uninstall-ucp --purge-config
MKE keeps the configuration by default in case you want to reinstall MKE later with the same configuration. For all available uninstall-ucp options, refer to mirantis/ucp uninstall-ucp.
Optional. Restore the host IP tables to their pre-MKE installation values by restarting the node.
The Calico network plugin changed the host IP tables from their original values during MKE installation.