My Kubernetes cluster on docker for desktop on Mac is non responsive.
So I tried to reset Kubernetes as was suggested in delete kubernetes cluster on docker-for-desktop OSX The results are:
All Kubernetes resources are deleted Kubernetes restart hangs GUI to disable Kubernetes is grayed out and non responsive
I would like to avoid reseting docker so I can keep my image repository
How do I manually remove Kubernetes from docker VM?
I can't give you a technical answer that immediately fixes your problem, and this text is too long for a comment... but as someone who also had the same issue (couldn't disable k8s without a factory reset in Docker for Mac), my recommendation is:
Is it really worth for you to keep the image repository? Consider, what's a container? A program. It's not a VM. Would you backup your ls
, ssh
, vim
... binaries when you want to initialize your OS? No right? But this is the same, you should view the container like another binary.
Odds here are that if you mess with manual actions, you will end up with a docker daemon in an undesired state. So, IMO, just go ahead and purge the Docker for Mac and start over, it's not really a big deal.
If you have tons of own images, you can build them right away. If you have tons of downloaded images, consider this as a good thing to do some cleaning. Also, notice that images work in layers, so if your images are correctly build leveraging the use of layers, the building process will be quite fast.
You can try disabling Docker Kubernetes in the settings file. You can find settings file in path ~/Library/Group\ Containers/group.com.docker/settings.json
. Edit kubernetesEnabled property to false.
"kubernetesEnabled" : false,
I have ended up in situation where k8s is partly deleted and was not able to start docker. Restarting and/or changing this setting helped and did not delete images. I was not able to reproduce the situation later.
Also make sure you are running latest version of Docker.
How about this?
‚docker rm -f $(docker ps -aq)‘
This deletes and removes all containers.