Skip to content

Commit fe03e13

Browse files
committed
Fix preflight check failure on node join.
We recently improved this to tolerate existence of things like /etc/kubernetes/manifests/ as an empty dir, but forgot to do so for the join pre-flight checks where it is also failing. Instead ensure only the sub-directories and files we need are available.
1 parent 59caf07 commit fe03e13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: cmd/kubeadm/app/preflight/checks.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,9 @@ func RunJoinNodeChecks(cfg *kubeadmapi.NodeConfiguration) error {
258258
PortOpenCheck{port: 10250},
259259
HttpProxyCheck{Proto: "https", Host: cfg.MasterAddresses[0], Port: int(cfg.APIPort)},
260260
HttpProxyCheck{Proto: "http", Host: cfg.MasterAddresses[0], Port: int(cfg.DiscoveryPort)},
261-
DirAvailableCheck{Path: "/etc/kubernetes"},
261+
DirAvailableCheck{Path: "/etc/kubernetes/manifests"},
262262
DirAvailableCheck{Path: "/var/lib/kubelet"},
263+
FileAvailableCheck{Path: "/etc/kubernetes/kubelet.conf"},
263264
InPathCheck{executable: "ebtables", mandatory: true},
264265
InPathCheck{executable: "ethtool", mandatory: true},
265266
InPathCheck{executable: "ip", mandatory: true},

0 commit comments

Comments
 (0)