code: func Upgrade(client kubernetes.Interface, opts *Options) error {
  	obj, err := client.ExtensionsV1beta1().Deployments(opts.Namespace).Get(deploymentName, metav1.GetOptions{})
  	if err != nil {
  		return err
  	}
  	tillerImage := obj.Spec.Template.Spec.Containers[0].Image
  	if semverCompare(tillerImage) == -1 && !opts.ForceUpgrade {
  		return errors.New("current Tiller version is newer, use --force-upgrade to downgrade")
  	}
  	obj.Spec.Template.Spec.Containers[0].Image = opts.SelectImage()
  	obj.Spec.Template.Spec.Containers[0].ImagePullPolicy = opts.pullPolicy()
  	obj.Spec.Template.Spec.ServiceAccountName = opts.ServiceAccount
  	if _, err := client.ExtensionsV1beta1().Deployments(opts.Namespace).Update(obj); err != nil {
  		return err
  	}
  	// If the service does not exist that would mean we are upgrading from a Tiller version
  	// that didn't deploy the service, so install it.
  	_, err = client.CoreV1().Services(opts.Namespace).Get(serviceName, metav1.GetOptions{})
  	if apierrors.IsNotFound(err) {
  		return createService(client.CoreV1(), opts.Namespace)
  	}
  	return err
  }
docs: // Upgrade uses Kubernetes client to upgrade Tiller to current version.
  //
  // Returns an error if the command failed.