code: func LookupContainerPortNumberByName(pod v1.Pod, name string) (int32, error) {
  	for _, ctr := range pod.Spec.Containers {
  		for _, ctrportspec := range ctr.Ports {
  			if ctrportspec.Name == name {
  				return ctrportspec.ContainerPort, nil
  			}
  		}
  	}
  
  	return int32(-1), fmt.Errorf("Pod '%s' does not have a named port '%s'", pod.Name, name)
  }
docs: // LookupContainerPortNumberByName find containerPort number by its named port name