gpt4 book ai didi

docker - Kubernetes(本地Docker方法)真的有效吗?

转载 作者:行者123 更新时间:2023-12-02 12:23:23 27 4
gpt4 key购买 nike

根据有关在容器内本地运行Kubernetes的官方文档here的信息-我已经仔细地遵循了所有步骤,当我输入connection refused时,仍然收到消息kubectl get nodes
docker ps显示api服务器未运行,并且docker logs kubelet确实确实如此:

[kubelet.go:1137] Unable to register 127.0.0.1 with the apiserver: Post http://localhost:8080/api/v1/nodes: dial tcp 127.0.0.1:8080: connection refused.

过了一会儿, docker logs kubelet
E0711 16:07:06.814735   33792 event.go:202] Unable to write event: 'Post http://localhost:8080/api/v1/namespaces/default/events: dial tcp 127.0.0.1:8080: connection refused' (may retry after sleeping)

显然,我并不是一个人遇到这个问题。

更新:
几个小时后, docker logs kubelet
E0712 08:28:03.528010   33792 pod_workers.go:138] Error syncing pod 4c6ab43ac4ee970e1f563d76ab3d3ec9, skipping: [failed to "StartContainer" for "controller-manager" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=controller-manager pod=k8s-master-127.0.0.1_default(4c6ab43ac4ee970e1f563d76ab3d3ec9)"
, failed to "StartContainer" for "apiserver" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=apiserver pod=k8s-master-127.0.0.1_default(4c6ab43ac4ee970e1f563d76ab3d3ec9)"
, failed to "StartContainer" for "setup" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=setup pod=k8s-master-127.0.0.1_default(4c6ab43ac4ee970e1f563d76ab3d3ec9)"
]

最佳答案

现在,在本地运行Kubernetes的最简单方法是Minikube,尽管我希望本地docker方法仍然可以运行。
docker ps -a是否显示任何崩溃的kube-apiserver容器,它们的日志中可能有任何线索?

关于docker - Kubernetes(本地Docker方法)真的有效吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38302190/

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