我已经使用 Kubeadm 和 VirtualBox 在笔记本电脑上安装了 K8S 集群。集群必须启动并运行才能看到如下所示的文档,这似乎有点奇怪。
praveensripati@praveen-ubuntu:~$ kubectl explain pods
Unable to connect to the server: dial tcp 192.168.0.31:6443: connect: no route to host
有什么解决办法吗?
最佳答案
参见“kubectl explain — #HeptioProTip”
Behind the scenes,
kubectl
just made an API request to my Kubernetes cluster, grabbed the current Swagger documentation of the API version running in the cluster, and output the documentation and object types.
尝试使用 kubectl help
作为离线替代方案,但这并不完整(仅限于 kubectl 本身)。
关于kubernetes - 无需启动 Kubernetes 的 Kubectl 文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52490166/