code: func NewCmdConfigImagesList(out io.Writer, mockK8sVersion *string) *cobra.Command {
  	externalcfg := &kubeadmapiv1beta2.InitConfiguration{}
  	kubeadmscheme.Scheme.Default(externalcfg)
  	var cfgPath, featureGatesString string
  	var err error
  
  	// This just sets the Kubernetes version for unit testing so kubeadm won't try to
  	// lookup the latest release from the internet.
  	if mockK8sVersion != nil {
  		externalcfg.KubernetesVersion = *mockK8sVersion
  	}
  
  	cmd := &cobra.Command{
  		Use:   "list",
  		Short: "Print a list of images kubeadm will use. The configuration file is used in case any images or image repositories are customized",
  		Run: func(_ *cobra.Command, _ []string) {
  			externalcfg.ClusterConfiguration.FeatureGates, err = features.NewFeatureGate(&features.InitFeatureGates, featureGatesString)
  			kubeadmutil.CheckErr(err)
  			imagesList, err := NewImagesList(cfgPath, externalcfg)
  			kubeadmutil.CheckErr(err)
  			kubeadmutil.CheckErr(imagesList.Run(out))
  		},
  	}
  	AddImagesCommonConfigFlags(cmd.PersistentFlags(), externalcfg, &cfgPath, &featureGatesString)
  	return cmd
  }
docs: // NewCmdConfigImagesList returns the "kubeadm config images list" command