Skip to content

Commit 974a91d

Browse files
authored
Merge pull request kubernetes#89603 from neolit123/automated-cherry-pick-of-#89602-origin-release-1.18
Automated cherry pick of kubernetes#89602: Kubeadm: fix Ready condition check
2 parents ff809a5 + 1b15cef commit 974a91d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/kubeadm/app/cmd/phases/join/kubelet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func runKubeletStartJoinPhase(c workflow.RunData) (returnErr error) {
148148
return errors.Wrapf(err, "cannot get Node %q", nodeName)
149149
}
150150
for _, cond := range node.Status.Conditions {
151-
if cond.Type == v1.NodeReady {
151+
if cond.Type == v1.NodeReady && cond.Status == v1.ConditionTrue {
152152
return errors.Errorf("a Node with name %q and status %q already exists in the cluster. "+
153153
"You must delete the existing Node or change the name of this new joining Node", nodeName, v1.NodeReady)
154154
}

0 commit comments

Comments
 (0)