To stop Kubernetes and Docker on your Ubuntu server, use these commands based on your specific setup. Stay human-friendly: if you’re doing this on a live server, remember to warn your team first!
1. Stop Kubernetes
The command depends on how you installed your cluster:
- Standard Kubeadm:
sudo systemctl stop kubelet - MicroK8s:
microk8s stop - Minikube:
minikube stop - K3s:
sudo systemctl stop k3s
2. Stop Docker
To shut down the Docker engine and its communication socket, run:
sudo systemctl stop docker
sudo systemctl stop docker.socket
3. Pro-Tip
If you want to make sure they don’t start back up automatically after a reboot, use the disable command:
sudo systemctl disable kubelet docker
Leave a Reply