code: func detectUnstableVersionError(newK8sVersion *version.Version, newK8sVersionStr string, allowExperimentalUpgrades, allowRCUpgrades bool) error {
  	// Short-circuit quickly if this is not an unstable version
  	if len(newK8sVersion.PreRelease()) == 0 {
  		return nil
  	}
  	// If the user has specified that unstable versions are fine, then no error should be returned
  	if allowExperimentalUpgrades {
  		return nil
  	}
  	// If this is a release candidate and we allow such ones, everything's fine
  	if strings.HasPrefix(newK8sVersion.PreRelease(), "rc") && allowRCUpgrades {
  		return nil
  	}
  
  	return errors.Errorf("Specified version to upgrade to %q is an unstable version and such upgrades weren't allowed via setting the --allow-*-upgrades flags", newK8sVersionStr)
  }
docs: // detectUnstableVersionError is a helper function for detecting if the unstable version (if specified) is allowed to be used