diff --git a/cmd/root.go b/cmd/root.go index ea212062..19611d95 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -87,7 +87,7 @@ func init() { func initConfig() { kubeconfig := flag.String("kubeconfig", filepath.Join(homeDir(), ".kube", "config"), "(optional) absolute path to the kubeconfig file") - rootCmd.PersistentFlags().StringVar(&cfgFile, "config", *kubeconfig, "config.yaml file (default is $HOME/.kubecm.yaml)") + rootCmd.Flags().StringVar(&cfgFile, "config", *kubeconfig, "config.yaml file (default is $HOME/.kubecm.yaml)") } func homeDir() string {