code: func NewCmdConfig(out io.Writer) *cobra.Command {
  	var kubeConfigFile string
  
  	cmd := &cobra.Command{
  		Use:   "config",
  		Short: "Manage configuration for a kubeadm cluster persisted in a ConfigMap in the cluster",
  		Long: fmt.Sprintf(dedent.Dedent(`
  			There is a ConfigMap in the %s namespace called %q that kubeadm uses to store internal configuration about the
  			cluster. kubeadm CLI v1.8.0+ automatically creates this ConfigMap with the config used with 'kubeadm init', but if you
  			initialized your cluster using kubeadm v1.7.x or lower, you must use the 'config upload' command to create this
  			ConfigMap. This is required so that 'kubeadm upgrade' can configure your upgraded cluster correctly.
  		`), metav1.NamespaceSystem, constants.KubeadmConfigConfigMap),
  		// Without this callback, if a user runs just the "upload"
  		// command without a subcommand, or with an invalid subcommand,
  		// cobra will print usage information, but still exit cleanly.
  		// We want to return an error code in these cases so that the
  		// user knows that their command was invalid.
  		RunE: cmdutil.SubCmdRunE("config"),
  	}
  
  	options.AddKubeConfigFlag(cmd.PersistentFlags(), &kubeConfigFile)
  
  	kubeConfigFile = cmdutil.GetKubeConfigPath(kubeConfigFile)
  	cmd.AddCommand(NewCmdConfigPrint(out))
  	cmd.AddCommand(NewCmdConfigMigrate(out))
  	cmd.AddCommand(NewCmdConfigUpload(out, &kubeConfigFile))
  	cmd.AddCommand(NewCmdConfigView(out, &kubeConfigFile))
  	cmd.AddCommand(NewCmdConfigImages(out))
  	return cmd
  }
docs: // NewCmdConfig returns cobra.Command for "kubeadm config" command