We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RKE version:
v0.3.0-rc3
These days,i review the codes of rke to find out how rke remove a nodes, and i get the step for rke to remove a node is following:
https://github.com/rancher/rke/blob/v0.3.0-rc3/hosts/hosts.go#L148
func DeleteNode(ctx context.Context, toDeleteHost *Host, kubeClient *kubernetes.Clientset, hasAnotherRole bool, cloudProvider string) error { if hasAnotherRole { log.Infof(ctx, "[hosts] host [%s] has another role, skipping delete from kubernetes cluster", toDeleteHost.Address) return nil } log.Infof(ctx, "[hosts] Cordoning host [%s]", toDeleteHost.Address) if _, err := k8s.GetNode(kubeClient, toDeleteHost.HostnameOverride); err != nil { if apierrors.IsNotFound(err) { log.Warnf(ctx, "[hosts] Can't find node by name [%s]", toDeleteHost.Address) return nil } return err } if err := k8s.CordonUncordon(kubeClient, toDeleteHost.HostnameOverride, true); err != nil { return err } log.Infof(ctx, "[hosts] Deleting host [%s] from the cluster", toDeleteHost.Address) if err := k8s.DeleteNode(kubeClient, toDeleteHost.HostnameOverride, cloudProvider); err != nil { return err } log.Infof(ctx, "[hosts] Successfully deleted host [%s] from the cluster", toDeleteHost.Address) return nil }
maybe it better to remove nodes by using kubectl drain way?
kubectl drain
The text was updated successfully, but these errors were encountered:
This will be improved in #1800
Sorry, something went wrong.
No branches or pull requests
RKE version:
v0.3.0-rc3
These days,i review the codes of rke to find out how rke remove a nodes, and i get the step for rke to remove a node is following:
https://github.com/rancher/rke/blob/v0.3.0-rc3/hosts/hosts.go#L148
maybe it better to remove nodes by using
kubectl drain
way?The text was updated successfully, but these errors were encountered: