kubernetes - 为什么我在集群中看不到工作节点?
问题描述
我正在运行一个带有种类的集群 - 一个工作节点。
但是,当我这样做时,我kubectl get nodes
看不到节点,而是看到“善良的控制平面”——这对我来说毫无意义,控制平面是一个节点??
工作节点必须正在运行,因为我可以kubectl exec --stdin --tty <name of the pod> /bin/sh
看到运行我的应用程序的容器内部。
这是一些奇怪的 WSL2 交互吗?或者我只是做错了什么?
解决方案
control-plane
is just a name. If you just run kind create cluster
, its default is to create a single-node cluster with the name control-plane
. From your description, everything is working properly.
One of kind's core features is the ability to run a "multi-node" cluster, but all locally in containers. If you want to test your application's behavior if, for example, you drain its pods from a node, you can run a kind cluster with one control-plane node (running etcd, the API server, and other core Kubernetes processes) and three worker nodes; let the application start up, then kubectl drain worker-1
and watch what happens. The documentation also notes that this is useful if you're developing on Kubernetes itself and need a "multi-node" control plan to test HA support.
推荐阅读
- rdp - 与会话断开连接后,RDP 正在调整大小?
- java - 验证是否通过反射调用了常规(非模拟)对象的方法
- msbuild - Xunit 和 msbuild 问题
- javascript - 如何编写高阶函数以在 JavaScript 中提供控制流?
- c# - 如何在控制台上的 x 坐标上移动字符串的所有字符
- python-3.x - 为什么我的 while 函数不能在 Python 上运行?
- sql-server - 在 grails 3.3.9 中提供默认的辅助排序列
- python - 在 python 中验证数据的最佳方法是什么?
- erlang - Tsung 中用于动态替换的模块的 Erlang 代码放在哪里
- css - 如何为不同的伪类复制材质 UI 样式?