-
Notifications
You must be signed in to change notification settings - Fork 715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NodeSwap feature supports in kubeadm #2563
Comments
/cc @ehashman |
Thanks for logging the issue.
I think it makes sense to remove the preflight check in the release when
the feature goes beta. Checking the kubelet args / config for the FG is
doable but a bit messy.
|
Actually, since we support kubelet n-1 skew, it should probably be done one
release after beta.
|
It makes sense. Hence, if it is beta in 1.23, kubeadm may add the support in 1.24+. For users like me who want to try the alpha feature, does the preflight check of swap-off too harsh? The workaround is to add ignore flag in 1.22. At least, the check should be removed in 1.23 when it’s beta in my opinions. |
Or we may change the check error to a warning message? |
Ok, in 1.23 we can switch it to warning. Remove it in 1.24.
|
looks like this is shifted to Beta for 1.24 due to some failures in CI and missing support in runtimes: |
😓 However, changing |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale kep seems tracked for beta in 1.24: |
update: looks like it was dropped from 1.24: |
Most PRs are ready early in the v1.24 cycle. |
No update in v1.25 for swap feature as Elana is ooo. Sergey will take the Sergey added it to v1.27 Plan and I will work on the swap cgroup v2 support part. |
the kubeadm setup docs mention swap and the new feature gate: to your comment in the other ticket:
you can direct your annoyance to sig node, which is the group that maintains the kubelet component, where the feature has been missing since k8s epoch. from the kubeadm docs:
that's not a good sign - basically an indication that the feature is not very stable yet (normally k8s beta features are on by default), thus turn swap off is our (kubeadm) recommendation. |
thanks for the pointer. i'm fine when this is documented / mentioned somewhere in the docs and i'm also totally fine that swap needs to be disabled. but it would be absolutely helpful especially for newbies, when pre-flight check would give a better hint. the existing warning gives a false impression/advice, imho. you may assume that it's not that harmful in non-production/test envs. and as said in the other ticket, i cannot remember that i have seen something fail to setup/init because swap was enabled. i have only seen the opposite, i.e. some installer complained that swap needs to be enabled, regardless if needed at installation time or not. i would NEVER have expected that an active swap would be installation/initialization blocker. i bet that 99 out of 100 linux admins also would not expect this, too. " [WARNING Swap]: swap is enabled; production deployments should disable swap unless testing the NodeSwap feature gate of the kubelet" |
FWIW, this ticket here is tracking the removal of the kubeadm preflight warning when NodeSwap becomes enabled by default. |
What we can do may be to return an error if the node is with cgroup v1 and swap on. Will this be more ambiguous? |
yes, certainly. but my system which cannot init or join when swap is active is on cgroup v2 (if is see this correctly) and i have also configured containerd appropriately if i re-enable swap, drain the cluster node, reboot that and re-join, it reproducably hangs at the stage "[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap..."
|
Hey all! Some clarifications regarding the current status of NodeSwap in k8s:
IOW: in order to run k8s on a swap-enabled node there's a need to provide Regarding cgroups: IMO it's safe to remove the error and not even replace it with a warning since to actually use swap the admin would need to explicitly change swap behavior, even if Please let me know if I can provide more information regarding this. |
to avoid further complains from kubeadm users and additional logged tickets, i think we should keep the preflight check until the kubelet config is updated to not fail on swap by default. is there a plan for that? |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
Hey @neolit123! As written here, the summary is:
So Can we make sure that the installation docs here https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/ are changed so that swap doesn't have to be turned off with kubeadm? |
@iholder101 would you be able to help us by pr- ing the docs? |
Yeah I'd love to. I'll get to it shortly. BTW, is there anything else required besides changing the docs? |
On a second sight I see that @pacoxu already updated the docs here: kubernetes/website#42820. @neolit123 @pacoxu So, is there anything missing? |
leaving this to @pacoxu to answer. |
My update of the website is too general at that time. Probably we should make it more clear of how to enable swap and use it in kubelet side.
This should be mentioned or we can link to the kubelet configuration details about swap to somewhere else which explained about the configurations of kubelet, including |
@iholder101 @pacoxu |
/reopen |
@pacoxu: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Is this a BUG REPORT or FEATURE REQUEST?
FEATURE REQUEST
/kind feature
Versions
kubeadm version (use
kubeadm version
):NodeSwap is alpha in 1.22 and will be beta1 in 1.28(still default disabled).
What happened?
I tested NodeSwap on my nodes and when I re-install my env, I got error related to swap.
I think it's time to start planning for Swap enabling support on the kubeadm side.
What you expected to happen?
There should be NodeSwap support in
kubeadm init
and we can skip the check if the feature gate is enabled.Or in 1.23, we should skip the prelight check by default as it will be beta.
How to reproduce it (as minimally and precisely as possible)?
swapon and run
kubeadm init
Anything else we need to know?
More details in kubernetes/enhancements#2400
/assign
The text was updated successfully, but these errors were encountered: