Skip to content
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

Disabling swap #147

Closed
ptr-dorjin opened this issue Sep 23, 2021 · 6 comments
Closed

Disabling swap #147

ptr-dorjin opened this issue Sep 23, 2021 · 6 comments

Comments

@ptr-dorjin
Copy link

Do we also need to disable swap before installing K3s?
I know that swap MUST be disabled before running kubelet (https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/)
I can't find that this role disables swap, and I don't see it in the prerequisites, so I'm not sure if I can install K3s with swap enabled.
What am I missing?

@vasanthaganeshk
Copy link

My cluster runs with swap.

@St0rmingBr4in
Copy link
Collaborator

swap should be disabled yes. We need to have this be at least specified in the README

@xamindar
Copy link

swap should be disabled yes. We need to have this be at least specified in the README

Can you provide info on why swap needs to be disabled? From my reading around it appears k8s, and by extension, k3s should run fine with swap enabled on more recent versions.

@dberardo-com
Copy link

how to check the level of swappiness inside the pod?

is this hte proper way ?

cat /proc/sys/vm/swappines

and also, i see that some pods are not being killed when the RAM usage goes bezond the limit.memory. could it be because of swap ? for example, i have a pod with a limit of 250MB mem, which is running (according to metrics-server) at 345 MB of mem. But if i run the command above, i see a level of swappiness of 30, so can i assume that the actual memory consumed is:

345 - 345*0.3 = 241.5 MB ?

@DonBower
Copy link

swap should be disabled yes. We need to have this be at least specified in the README

Can you provide info on why swap needs to be disabled? From my reading around it appears k8s, and by extension, k3s should run fine with swap enabled on more recent versions.

https://discuss.kubernetes.io/t/swap-off-why-is-it-necessary/6879/3

@dereknola
Copy link
Member

Added note in README about disabling swap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants