From f5c69fde39fd019a65726756cba874c121361756 Mon Sep 17 00:00:00 2001 From: carlory Date: Tue, 28 May 2024 12:01:11 +0800 Subject: [PATCH] kubeadm: update warning message for the swap check Co-authored-by: Lubomir I. Ivanov --- cmd/kubeadm/app/preflight/checks.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/kubeadm/app/preflight/checks.go b/cmd/kubeadm/app/preflight/checks.go index 201e8913065..af983fda7af 100644 --- a/cmd/kubeadm/app/preflight/checks.go +++ b/cmd/kubeadm/app/preflight/checks.go @@ -651,7 +651,9 @@ func (swc SwapCheck) Check() (warnings, errorList []error) { } if len(buf) > 1 { - return []error{errors.New("swap is supported for cgroup v2 only; the NodeSwap feature gate of the kubelet is beta but disabled by default")}, nil + return []error{errors.New("swap is supported for cgroup v2 only. " + + "The kubelet must be properly configured to use swap. Please refer to https://kubernetes.io/docs/concepts/architecture/nodes/#swap-memory, " + + "or disable swap on the node")}, nil } return nil, nil