code: func (o *DeploymentOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error {
  	name, err := NameFromCommandArgs(cmd, args)
  	if err != nil {
  		return err
  	}
  
  	clientset, err := f.KubernetesClientSet()
  	if err != nil {
  		return err
  	}
  
  	generatorName := cmdutil.GetFlagString(cmd, "generator")
  
  	if len(generatorName) == 0 {
  		generatorName = generateversioned.DeploymentBasicAppsV1GeneratorName
  		generatorNameTemp, err := generateversioned.FallbackGeneratorNameIfNecessary(generatorName, clientset.Discovery(), o.CreateSubcommandOptions.ErrOut)
  		if err != nil {
  			return err
  		}
  		if generatorNameTemp != generatorName {
  			cmdutil.Warning(o.CreateSubcommandOptions.ErrOut, generatorName, generatorNameTemp)
  		} else {
  			generatorName = generatorNameTemp
  		}
  	}
  
  	imageNames := cmdutil.GetFlagStringSlice(cmd, "image")
  	generator, ok := generatorFromName(generatorName, imageNames, name)
  	if !ok {
  		return errUnsupportedGenerator(cmd, generatorName)
  	}
  
  	return o.CreateSubcommandOptions.Complete(f, cmd, args, generator)
  }
docs: // Complete completes all the options