code: func (c *Client) WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, timeout time.Duration) (v1.PodPhase, error) {
  	infos, err := c.Build(namespace, reader)
  	if err != nil {
  		return v1.PodUnknown, err
  	}
  	info := infos[0]
  
  	kind := info.Mapping.GroupVersionKind.Kind
  	if kind != "Pod" {
  		return v1.PodUnknown, fmt.Errorf("%s is not a Pod", info.Name)
  	}
  
  	if err := c.watchPodUntilComplete(timeout, info); err != nil {
  		return v1.PodUnknown, err
  	}
  
  	if err := info.Get(); err != nil {
  		return v1.PodUnknown, err
  	}
  	status := info.Object.(*v1.Pod).Status.Phase
  
  	return status, nil
  }
docs: // WaitAndGetCompletedPodPhase waits up to a timeout until a pod enters a completed phase
  // and returns said phase (PodSucceeded or PodFailed qualify).