提醒:以下操作会删除docker镜像释放空间,请慎重操作。

以下copy自kind – Known Issues k8s问题汇总

Failing to properly start cluster 未能正确启动群集

This issue is similar to a failure while building the node image. If the cluster creation process was successful but you are unable to see any Kubernetes resources running, for example:

这个问题类似于生成节点映像时的故障。如果集群创建过程成功,但是您无法看到任何 Kubernetes 资源运行,例如:

$ docker ps
CONTAINER ID        IMAGE                  COMMAND                  CREATED              STATUS              PORTS                      NAMES
c0261f7512fd        kindest/node:v1.12.2   "/usr/local/bin/entr…"   About a minute ago   Up About a minute   0.0.0.0:64907->64907/tcp   kind-1-control-plane
$ docker exec -it c0261f7512fd /bin/sh
# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
#

or kubectl being unable to connect to the cluster,

或者 kubectl 无法连接到集群,

$ kind export kubeconfig
$ kubectl cluster-info

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Unable to connect to the server: EOF

Then as in kind#156, you may solve this issue by claiming back some space on your machine by removing unused data or images left by the Docker engine by running:

然后,就像实物 # 156一样,你可以通过运行以下命令来移除 Docker 引擎留下的未使用的数据或图像,从而回收机器上的一些空间,从而解决这个问题:

COPY 收到
docker system prune

And / or:

及/或:

COPY 收到
docker image prune

You can verify the issue by exporting the logs (kind export logs) and looking at the kubelet logs, which may have something like the following:

您可以通过导出日志(类型导出日志)和查看 kubelet 日志来验证这个问题,这些日志可能具有以下内容:

Dec 07 00:37:53 kind-1-control-plane kubelet[688]: I1207 00:37:53.229561     688 eviction_manager.go:340] eviction manager: must evict pod(s) to reclaim ephemeral-storage
Dec 07 00:37:53 kind-1-control-plane kubelet[688]: E1207 00:37:53.229638     688 eviction_manager.go:351] eviction manager: eviction thresholds have been met, but no pods are active to evict
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐