使用 kubeadm 上传配置时,子命令无效:“upload”

使用 kubeadm 上传配置时,子命令无效:“upload”

当我想使用 kubeadmkubeadm version: &version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.3", GitCommit:"ca643a4d1f7bfe34773c74f79527be4afd95bf39", GitTreeState:"clean", BuildDate:"2021-07-15T21:03:28Z", GoVersion:"go1.16.6", Compiler:"gc", Platform:"linux/amd64"}上传这样的配置文件时:

kubeadm config upload from-file --kubeconfig kubeadm-config.yaml

它给我错误:

[root@k8smasterone config]# kubeadm config upload from-file --kubeconfig kubeadm-config.yaml
invalid subcommand: "upload"
To see the stack trace of this error execute with --v=5 or higher

我已阅读 kubeadm 手册,但没有找到任何替换为上传的内容,我应该如何上传配置文件?

答案1

我在新版本中这样做:

kubeadm init phase upload-config kubeadm --config kubeadm-config.yaml

更多信息:https://github.com/kubernetes/kubeadm/issues/988

相关内容