mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
kubeadm: fix the bug that windows node failed to join IPv6 cluster due to preflight failures
Signed-off-by: SataQiu <shidaqiu2018@gmail.com>
This commit is contained in:
parent
a504daa048
commit
6c57e2fced
@ -933,7 +933,7 @@ func RunInitNodeChecks(execer utilsexec.Interface, cfg *kubeadmapi.InitConfigura
|
||||
|
||||
// Check if Bridge-netfilter and IPv6 relevant flags are set
|
||||
if ip := netutils.ParseIPSloppy(cfg.LocalAPIEndpoint.AdvertiseAddress); ip != nil {
|
||||
if netutils.IsIPv6(ip) {
|
||||
if netutils.IsIPv6(ip) && runtime.GOOS == "linux" {
|
||||
checks = append(checks,
|
||||
FileContentCheck{Path: bridgenf6, Content: []byte{'1'}},
|
||||
FileContentCheck{Path: ipv6DefaultForwarding, Content: []byte{'1'}},
|
||||
@ -1003,7 +1003,7 @@ func RunJoinNodeChecks(execer utilsexec.Interface, cfg *kubeadmapi.JoinConfigura
|
||||
}
|
||||
}
|
||||
}
|
||||
if addIPv6Checks {
|
||||
if addIPv6Checks && runtime.GOOS == "linux" {
|
||||
checks = append(checks,
|
||||
FileContentCheck{Path: bridgenf6, Content: []byte{'1'}},
|
||||
FileContentCheck{Path: ipv6DefaultForwarding, Content: []byte{'1'}},
|
||||
|
Loading…
Reference in New Issue
Block a user