code: func (kl *Kubelet) GetAttach(podFullName string, podUID types.UID, containerName string, streamOpts remotecommandserver.Options) (*url.URL, error) {
  	container, err := kl.findContainer(podFullName, podUID, containerName)
  	if err != nil {
  		return nil, err
  	}
  	if container == nil {
  		return nil, fmt.Errorf("container %s not found in pod %s", containerName, podFullName)
  	}
  
  	// The TTY setting for attach must match the TTY setting in the initial container configuration,
  	// since whether the process is running in a TTY cannot be changed after it has started.  We
  	// need the api.Pod to get the TTY status.
  	pod, found := kl.GetPodByFullName(podFullName)
  	if !found || (string(podUID) != "" && pod.UID != podUID) {
  		return nil, fmt.Errorf("pod %s not found", podFullName)
  	}
  	containerSpec := kubecontainer.GetContainerSpec(pod, containerName)
  	if containerSpec == nil {
  		return nil, fmt.Errorf("container %s not found in pod %s", containerName, podFullName)
  	}
  	tty := containerSpec.TTY
  
  	return kl.streamingRuntime.GetAttach(container.ID, streamOpts.Stdin, streamOpts.Stdout, streamOpts.Stderr, tty)
  }
docs: // GetAttach gets the URL the attach will be served from, or nil if the Kubelet will serve it.