Skip to content

Commit 1b15cef

Browse files
kvapsneolit123
authored andcommitted
Kubeadm: fix Ready condition check
1 parent 93e62e6 commit 1b15cef

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)