code: func RemoveStackedEtcdMemberFromCluster(client clientset.Interface, cfg *kubeadmapi.InitConfiguration) error {
  	// creates an etcd client that connects to all the local/stacked etcd members
  	klog.V(1).Info("[etcd] creating etcd client that connects to etcd pods")
  	etcdClient, err := etcdutil.NewFromCluster(client, cfg.CertificatesDir)
  	if err != nil {
  		return err
  	}
  
  	// notifies the other members of the etcd cluster about the removing member
  	etcdPeerAddress := etcdutil.GetPeerURL(&cfg.LocalAPIEndpoint)
  
  	klog.V(2).Infof("[etcd] get the member id from peer: %s", etcdPeerAddress)
  	id, err := etcdClient.GetMemberID(etcdPeerAddress)
  	if err != nil {
  		return err
  	}
  
  	klog.V(1).Infof("[etcd] removing etcd member: %s, id: %d", etcdPeerAddress, id)
  	members, err := etcdClient.RemoveMember(id)
  	if err != nil {
  		return err
  	}
  	klog.V(1).Infof("[etcd] Updated etcd member list: %v", members)
  
  	return nil
  }
docs: // RemoveStackedEtcdMemberFromCluster will remove a local etcd member from etcd cluster,
  // when reset the control plane node.