gpt4 book ai didi

windows - 如何让 kubernetes 在 docker for desktop 在 windows 中运行

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

looks like this
使用 Windows 版本 10,
docker for windows(docker verion):18.09.2

如何解决这个问题?

最佳答案

Kubernetes 应该正在运行。
但请检查您的集群信息:

> kubectl cluster-info
Kubernetes master is running at http://localhost:8080

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
这在 docker/machine 中都有报道。和 docker/for-winkubernetes/minikube .
虽然问题悬而未决,如果不涉及防火墙/代理,我看到了由于 the port is already taken 导致的错误。 .
另见 this article :

Issue

The reason you are getting the error message is that Kuberentes is not looking into the correct configuration folder because the configuration path is not configured on the Windows 10 machine.

Solution

To fix the problem, I will run the command below that will tell Kubernetes where to find the configuration file on the machine.

Powershell
[Environment]::SetEnvironmentVariable("KUBECONFIG", $HOME + "\.kube\config", [EnvironmentVariableTarget]::Machine)

关于windows - 如何让 kubernetes 在 docker for desktop 在 windows 中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55293344/

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