code: func NewCmdConfigUploadFromFile(out io.Writer, kubeConfigFile *string) *cobra.Command {
  	var cfgPath string
  	cmd := &cobra.Command{
  		Use:   "from-file",
  		Short: "Upload a configuration file to the in-cluster ConfigMap for kubeadm configuration",
  		Long: fmt.Sprintf(dedent.Dedent(`
  			Using this command, you can upload configuration to the ConfigMap in the cluster using the same config file you gave to 'kubeadm init'.
  			If you initialized your cluster using a v1.7.x or lower kubeadm client and used the --config option, you need to run this command with the
  			same config file before upgrading to v1.8 using 'kubeadm upgrade'.
  
  			The configuration is located in the %q namespace in the %q ConfigMap.
  		`), metav1.NamespaceSystem, constants.KubeadmConfigConfigMap),
  		Run: func(cmd *cobra.Command, args []string) {
  			if len(cfgPath) == 0 {
  				kubeadmutil.CheckErr(errors.New("The --config flag is mandatory"))
  			}
  
  			klog.V(1).Infoln("[config] retrieving ClientSet from file")
  			client, err := kubeconfigutil.ClientSetFromFile(*kubeConfigFile)
  			kubeadmutil.CheckErr(err)
  
  			// Default both statically and dynamically, convert to internal API type, and validate everything
  			internalcfg, err := configutil.LoadInitConfigurationFromFile(cfgPath)
  			kubeadmutil.CheckErr(err)
  
  			// Upload the configuration using the file
  			klog.V(1).Infof("[config] uploading configuration")
  			err = uploadconfig.UploadConfiguration(internalcfg, client)
  			kubeadmutil.CheckErr(err)
  		},
  	}
  	options.AddConfigFlag(cmd.Flags(), &cfgPath)
  	return cmd
  }
docs: // NewCmdConfigUploadFromFile verifies given Kubernetes config file and returns cobra.Command for
  // "kubeadm config upload from-file" command