当我想使用 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