code: func (gce *Cloud) ExternalID(nodeName types.NodeName) (string, error) {
  	instanceName := mapNodeNameToInstanceName(nodeName)
  	if gce.useMetadataServer {
  		// Use metadata, if possible, to fetch ID. See issue #12000
  		if gce.isCurrentInstance(instanceName) {
  			externalInstanceID, err := getCurrentExternalIDViaMetadata()
  			if err == nil {
  				return externalInstanceID, nil
  			}
  		}
  	}
  
  	// Fallback to GCE API call if metadata server fails to retrieve ID
  	inst, err := gce.getInstanceByName(instanceName)
  	if err != nil {
  		return "", err
  	}
  	return strconv.FormatUint(inst.ID, 10), nil
  }
docs: // ExternalID returns the cloud provider ID of the node with the specified NodeName (deprecated).