code: func (p *ExecOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, argsIn []string, argsLenAtDash int) error {
  	// Let kubectl exec follow rules for `--`, see #13004 issue
  	if len(p.PodName) == 0 && (len(argsIn) == 0 || argsLenAtDash == 0) {
  		return cmdutil.UsageErrorf(cmd, execUsageStr)
  	}
  	if len(p.PodName) != 0 {
  		if len(argsIn) < 1 {
  			return cmdutil.UsageErrorf(cmd, execUsageStr)
  		}
  		p.Command = argsIn
  	} else {
  		p.ResourceName = argsIn[0]
  		p.Command = argsIn[1:]
  	}
  
  	var err error
  
  	p.Namespace, _, err = f.ToRawKubeConfigLoader().Namespace()
  	if err != nil {
  		return err
  	}
  
  	p.ExecutablePodFn = polymorphichelpers.AttachablePodForObjectFn
  
  	p.GetPodTimeout, err = cmdutil.GetPodRunningTimeoutFlag(cmd)
  	if err != nil {
  		return cmdutil.UsageErrorf(cmd, err.Error())
  	}
  
  	p.Builder = f.NewBuilder
  	p.restClientGetter = f
  
  	cmdParent := cmd.Parent()
  	if cmdParent != nil {
  		p.FullCmdName = cmdParent.CommandPath()
  	}
  	if len(p.FullCmdName) > 0 && cmdutil.IsSiblingCommandExists(cmd, "describe") {
  		p.SuggestedCmdUsage = fmt.Sprintf("Use '%s describe %s -n %s' to see all of the containers in this pod.", p.FullCmdName, p.ResourceName, p.Namespace)
  	}
  
  	p.Config, err = f.ToRESTConfig()
  	if err != nil {
  		return err
  	}
  
  	clientset, err := f.KubernetesClientSet()
  	if err != nil {
  		return err
  	}
  	p.PodClient = clientset.CoreV1()
  
  	return nil
  }
docs: // Complete verifies command line arguments and loads data from the command environment