mirror of https://github.com/k3s-io/k3s
Merge pull request #74033 from bart0sh/PR0060-kubeadm-975-RequiredIPVSKernelModulesAvailable-warning-seems-confusing
kubeadm: fix RequiredIPVSKernelModulesAvailable warning messagepull/564/head
commit
43616fc920
|
@ -41,6 +41,7 @@ go_library(
|
||||||
"@io_bazel_rules_go//go/platform:linux": [
|
"@io_bazel_rules_go//go/platform:linux": [
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||||
"//vendor/github.com/docker/libnetwork/ipvs:go_default_library",
|
"//vendor/github.com/docker/libnetwork/ipvs:go_default_library",
|
||||||
|
"//vendor/github.com/lithammer/dedent:go_default_library",
|
||||||
"//vendor/k8s.io/klog:go_default_library",
|
"//vendor/k8s.io/klog:go_default_library",
|
||||||
],
|
],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
|
|
|
@ -26,6 +26,7 @@ import (
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
utilsexec "k8s.io/utils/exec"
|
utilsexec "k8s.io/utils/exec"
|
||||||
|
|
||||||
|
"github.com/lithammer/dedent"
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -80,10 +81,20 @@ func (r RequiredIPVSKernelModulesAvailableCheck) Check() (warnings, errors []err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(builtInModules) != 0 {
|
if len(builtInModules) != 0 {
|
||||||
warnings = append(warnings, fmt.Errorf(
|
warnings = append(warnings, fmt.Errorf(dedent.Dedent(`
|
||||||
"the IPVS proxier will not be used, because the following required kernel modules are not loaded: %v or no builtin kernel ipvs support: %v\n"+
|
|
||||||
"you can solve this problem with following methods:\n 1. Run 'modprobe -- ' to load missing kernel modules;\n"+
|
The IPVS proxier may not be used because the following required kernel modules are not loaded: %v
|
||||||
"2. Provide the missing builtin kernel ipvs support\n", modules, builtInModules))
|
or no builtin kernel IPVS support was found: %v.
|
||||||
|
However, these modules may be loaded automatically by kube-proxy if they are available on your system.
|
||||||
|
To verify IPVS support:
|
||||||
|
|
||||||
|
Run "lsmod | grep 'ip_vs|nf_conntrack'" and verify each of the above modules are listed.
|
||||||
|
|
||||||
|
If they are not listed, you can use the following methods to load them:
|
||||||
|
|
||||||
|
1. For each missing module run 'modprobe $modulename' (e.g., 'modprobe ip_vs', 'modprobe ip_vs_rr', ...)
|
||||||
|
2. If 'modprobe $modulename' returns an error, you will need to install the missing module support for your kernel.
|
||||||
|
`), modules, builtInModules))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue