Kubeadm init 警告 - 没有可用的验证器

Warning on Kubeadm init - No validator is available

我正在尝试使用 kubeadm 设置最小可行的 kubernetes 集群。 在调用 kubeadm init 命令时,我收到以下警告。

W0218 23:13:59.411414 25332 validation.go:28] Cannot validate kube-proxy config - no validator is available

W0218 23:13:59.411496 25332 validation.go:28] Cannot validate kubelet config - no validator is available

这个警告到底是什么意思?我在哪里可以找到这些验证器?

我浏览了几个链接,每个人都建议忽略它。但我真的很想知道为什么会出现这个警告

这是一个known issue

Define policy around klog.Warning usage in kubeadm #1913

还有一个解决方法:

尝试kubeadm reset

手动:kubeadm reset - Kubernetes

kubeadm reset

note:

The reset process does not clean CNI configuration. To do so, you must remove /etc/cni/net.d

The reset process does not reset or clean up iptables rules or IPVS tables. If you wish to reset iptables, you must do so manually by using the "iptables" command.

If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar) to reset your system's IPVS tables.

如果没有帮助,您可以隐藏控制台输出的警告

polarapfel recommends to hide warnings :)

Here's a quick fix to folks being thrown off by this behaviour in their automation scripts: redirect stderr to /dev/null (or elsewhere).

For example, if you wanted the join command, you'd do this

kubeadm token create --print-join-command 2>/dev/null