mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Check config path for command "kubeadm alpha phase kubelet write-env-file"
This commit is contained in:
parent
81c6b735fa
commit
3f2c7b6fda
@ -125,6 +125,10 @@ func NewCmdKubeletWriteEnvFile() *cobra.Command {
|
|||||||
Long: kubeletWriteEnvFileLongDesc,
|
Long: kubeletWriteEnvFileLongDesc,
|
||||||
Example: kubeletWriteEnvFileExample,
|
Example: kubeletWriteEnvFileExample,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
|
if len(cfgPath) == 0 {
|
||||||
|
kubeadmutil.CheckErr(fmt.Errorf("The --config flag is mandatory"))
|
||||||
|
}
|
||||||
|
|
||||||
err := RunKubeletWriteEnvFile(cfgPath)
|
err := RunKubeletWriteEnvFile(cfgPath)
|
||||||
kubeadmutil.CheckErr(err)
|
kubeadmutil.CheckErr(err)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user