code: func getNodeNameFromKubeletConfig(kubeconfigDir string) (string, error) {
  	// loads the kubelet.conf file
  	fileName := filepath.Join(kubeconfigDir, constants.KubeletKubeConfigFileName)
  	config, err := clientcmd.LoadFromFile(fileName)
  	if err != nil {
  		return "", err
  	}
  
  	// gets the info about the current user
  	authInfo := config.AuthInfos[config.Contexts[config.CurrentContext].AuthInfo]
  
  	// gets the X509 certificate with current user credentials
  	var certs []*x509.Certificate
  	if len(authInfo.ClientCertificateData) > 0 {
  		// if the config file uses an embedded x509 certificate (e.g. kubelet.conf created by kubeadm), parse it
  		if certs, err = certutil.ParseCertsPEM(authInfo.ClientCertificateData); err != nil {
  			return "", err
  		}
  	} else if len(authInfo.ClientCertificate) > 0 {
  		// if the config file links an external x509 certificate (e.g. kubelet.conf created by TLS bootstrap), load it
  		if certs, err = certutil.CertsFromFile(authInfo.ClientCertificate); err != nil {
  			return "", err
  		}
  	} else {
  		return "", errors.New("invalid kubelet.conf. X509 certificate expected")
  	}
  
  	// We are only putting one certificate in the certificate pem file, so it's safe to just pick the first one
  	// TODO: Support multiple certs here in order to be able to rotate certs
  	cert := certs[0]
  
  	// gets the node name from the certificate common name
  	return strings.TrimPrefix(cert.Subject.CommonName, constants.NodesUserPrefix), nil
  }
docs: // getNodeNameFromKubeletConfig gets the node name from a kubelet config file
  // TODO: in future we want to switch to a more canonical way for doing this e.g. by having this
  //       information in the local kubelet config.yaml