Instance in machine pool failed to join cluster with error bootstrap token not found #11034
Labels
area/bootstrap
Issues or PRs related to bootstrap providers
area/machinepool
Issues or PRs related to machinepools
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
priority/important-soon
Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
What steps did you take and what happened?
After I used
clusterctl move
to migrated an existed workload cluster to a new management cluster, instance in aws machine pool failed to join the cluster and dead loop create/terminate ec2 instances.Error log found in kubeadmin bootstrap controller:
Root cause should be:
clusterctl move
, cluster will put onpaused
filed and stop reconcilingnodeRef
in the machinePool status, refer to this code block: https://github.com/kubernetes-sigs/cluster-api/blob/v1.7.4/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go#L274-L280What did you expect to happen?
For the
refreshBootstrapTokenIfNeeded
function, if token not found, should create a new one instead of just raise error:https://github.com/kubernetes-sigs/cluster-api/blob/v1.7.4/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go#L326-L329
Cluster API version
v1.7.4
Kubernetes version
v1.27.12
Anything else you would like to add?
No response
Label(s) to be applied
/kind bug
One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.
The text was updated successfully, but these errors were encountered: