2

当我执行此命令时kubectl get pods --all-namespaces,我得到了Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

我所有的 pod 都在运行并准备好 1/1,但是当我使用它时,microk8s kubectl get service -n kube-system我得到了

kubernetes-dashboard        ClusterIP   10.152.183.132   <none>        443/TCP    6h13m
dashboard-metrics-scraper   ClusterIP   10.152.183.10    <none>        8000/TCP   6h13m

即使启用了 dns,我也缺少 kube-dns。此外,当我为所有 IP 地址的代理键入此内容时,microk8s kubectl proxy --accept-hosts=.* --address=0.0.0.0 &我只会得到此Starting to serve on [::]:8001内容,例如,我缺少 [1]84623。

我在 Windows 上使用 microk8s 和带有 Hyper-V 管理器的多通道,我无法访问网络上的仪表板。我也是初学者,这是我的大学论文。我在网上看到了类似的东西,但它是针对 Azure 的。

4

1 回答 1

1

从评论中发布答案以获得更好的可见性:通过重新安装 multipass 和 microk8s 解决了问题。现在它起作用了。

于 2021-12-27T08:21:27.770 回答