Cannot stop 10 containers after Kubernetes minikube tutorial

六眼飞鱼酱① 提交于 2019-12-05 12:54:42

What containers do you want to delete and why? The containers printed in your docker ps output are Kubernetes containers. You basically would destroy minikube by deleting these containers.

In general Kubernetes manages these containers for you. Kubernetes interprets a deleted container as a failure and restarts it. To delete a container you have to delete the pod (or the ReplicaSet, ReplicationController or Deployment depending on your deployed applications).


If these containers actually appear on your host system, then you maybe installed Kubernetes accidentally on your host system (with another tutorial). In this case you have to look for a process called kubelet which creates these containers.

For example if you use systemd:

systemctl status kublet   # see if its actually running
systemctl stop kubelet    # stop it
systemctl disable kubelet # make sure it doesn't start after next reboot

If you don't want to run kubernetes then minikube isn't needed and you can stop it and delete it.

minikube stop
minikube delete

Or, if you wan't it running, for some reason, just remove the environment variable DOCKER_HOST that eval $(minikube docker-env) set up for you. It points the docker client to the docker engine in minikube instead of your local machine.

unset DOCKER_HOST

Or, start a new terminal. It won't have the environment variable set.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!