gpt4 book ai didi

docker - Kubernetes minikube 教程后无法停止 10 个容器

转载 作者:行者123 更新时间:2023-12-05 00:13:55 25 4
gpt4 key购买 nike

docker ps screenshot
docker ps

CONTAINER ID        IMAGE                                                  COMMAND                  CREATED             STATUS              PORTS               NAMES
7523fd2c20c7 gcr.io/google_containers/k8s-dns-sidecar-amd64 "/sidecar --v=2 --..." 18 hours ago Up 18 hours k8s_sidecar_kube-dns-86f6f55dd5-qwc6z_kube-system_c1333ffc-e4d6-11e7-bccf-0021ccbf0996_0
9bd438011406 gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64 "/dnsmasq-nanny -v..." 18 hours ago Up 18 hours k8s_dnsmasq_kube-dns-86f6f55dd5-qwc6z_kube-system_c1333ffc-e4d6-11e7-bccf-0021ccbf0996_0
5c35e00a5a27 gcr.io/google_containers/k8s-dns-kube-dns-amd64 "/kube-dns --domai..." 18 hours ago Up 18 hours k8s_kubedns_kube-dns-86f6f55dd5-qwc6z_kube-system_c1333ffc-e4d6-11e7-bccf-0021ccbf0996_0
77ef463642b7 gcr.io/google_containers/pause-amd64:3.0 "/pause" 18 hours ago Up 18 hours k8s_POD_kube-dns-86f6f55dd5-qwc6z_kube-system_c1333ffc-e4d6-11e7-bccf-0021ccbf0996_0
39f618666205 gcr.io/google_containers/kubernetes-dashboard-amd64 "/dashboard --inse..." 18 hours ago Up 18 hours k8s_kubernetes-dashboard_kubernetes-dashboard-vgpjl_kube-system_c1176a44-e4d6-11e7-bccf-0021ccbf0996_0
023b7b554a8c gcr.io/google_containers/pause-amd64:3.0 "/pause" 18 hours ago Up 18 hours k8s_POD_kubernetes-dashboard-vgpjl_kube-system_c1176a44-e4d6-11e7-bccf-0021ccbf0996_0
1c3bdb7bdeb1 gcr.io/google-containers/kube-addon-manager "/opt/kube-addons.sh" 18 hours ago Up 18 hours k8s_kube-addon-manager_kube-addon-manager-tpad_kube-system_7b19c3ba446df5355649563d32723e4f_0
8a00feefa754 gcr.io/google_containers/pause-amd64:3.0 "/pause" 18 hours ago Up 18 hours k8s_POD_kube-addon-manager-tpad_kube-system_7b19c3ba446df5355649563d32723e4f_0
b657eab5f6f5 gcr.io/k8s-minikube/storage-provisioner "/storage-provisioner" 18 hours ago Up 18 hours k8s_storage-provisioner_storage-provisioner_kube-system_c0a8b187-e4d6-11e7-bccf-0021ccbf0996_0
67be5cc1dd0d gcr.io/google_containers/pause-amd64:3.0 "/pause" 18 hours ago Up 18 hours k8s_POD_storage-provisioner_kube-system_c0a8b187-e4d6-11e7-bccf-0021ccbf0996_0

我刚刚在 https://github.com/kubernetes/minikube 上完成了 Kubernetes minikube 教程,而且我无法停止或移除这些容器,它们总是会重新创建。
$ kubectl get deployment
No resource found.

$ minikube status
minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.100
kubectl get pods --all-namespaces 的输出
NAMESPACE     NAME                          READY     STATUS    RESTARTS   AGE
kube-system kube-addon-manager-minikube 1/1 Running 5 19h
kube-system kube-dns-86f6f55dd5-6kjsn 3/3 Running 15 19h
kube-system kubernetes-dashboard-68vph 1/1 Running 5 19h
kube-system storage-provisioner 1/1 Running 5 19h

更新:

我完全删除了所有名为“kube*”的包,删除了docker,删除了virtualbox,删除了/var/lib/docker,重新安装了docker。
容器又回来了!你到底是如何摆脱它们的?

最佳答案

您要删除哪些容器,为什么?您的 docker ps 中打印的容器输出是 Kubernetes 容器。您基本上会通过删除这些容器来破坏 minikube。

通常,Kubernetes 会为您管理这些容器。 Kubernetes 将删除的容器解释为失败并重新启动它。要删除容器,您必须删除 pod(或 ReplicaSet、ReplicationController 或 Deployment,具体取决于您部署的应用程序)。

如果这些容器确实出现在您的主机系统上,那么您可能不小心在您的主机系统上安装了 Kubernetes(还有另一个教程)。在这种情况下,您必须查找名为 kubelet 的进程。创建这些容器。

例如,如果您使用 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

关于docker - Kubernetes minikube 教程后无法停止 10 个容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47891870/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com