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

kubeadm init or join fails when swap is active #3017

Closed
devZer0 opened this issue Feb 7, 2024 · 1 comment
Closed

kubeadm init or join fails when swap is active #3017

devZer0 opened this issue Feb 7, 2024 · 1 comment

Comments

@devZer0
Copy link

devZer0 commented Feb 7, 2024

i'm getting this message on init/join

[WARNING Swap]: swap is enabled; production deployments should disable swap unless testing the NodeSwap feature gate of the kubelet

when swap enabled, kubadm init/join fails with obscure errors and for no apparent reason.

if swap BLOCKS kubeadm init/join it should not be a WARNING but an ERROR and it should be a mandatory/prerequisite requirement that swap is being disabled before any further action with kubernetes

i'm 25yrs+ into linux/unix and i have NEVER seen something fail because swap being active, so this cost me a while to find out that this has blocked kubernetes installation/configuration

did cost me some hours today and project now is using cloud provider now because i was not fast/reliable enough for providing a dev environment.

i did not disable swap at installation time as i did comment out in /etc/fstab and thought, the next reboot is ok for that. i had NEVER thought that this could create installation issues

that sucks

Versions

kubeadm version (use kubeadm version):

Environment:

  • Kubernetes version (use kubectl version):

kubectl version

Client Version: v1.28.6
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.6

  • Cloud provider or hardware configuration:
    3x virtual machine on pve 7.4 hypervisor, 8gb ram, 4vcpu

  • OS (e.g. from /etc/os-release):
    Debian 12 Bookworm

  • Kernel (e.g. uname -a):
    Kernel 6.1.0-17-amd64

  • Container runtime (CRI) (e.g. containerd, cri-o):

dpkg --list|egrep "containerd|cri-"

ii containerd 1.6.20~ds1-1+b1 amd64 open and reliable container runtime
ii cri-tools 1.28.0-1.1 amd64 Command-line utility for interacting with a container runtime

#1893 (comment)

"@cheeseyeah and anyone else stumbling upon this thread: in my case the containers where not created, or at least they weren't there after the kubeadm command finished. I managed to make it work only after disabling swap. This is crazy, from my point of view, because swap is a normal OS function and shouldn't create this bizarre behavior. But, hey, it works."

yes @rendler-denis, i think that can be called "crazy" to some degree :)

@neolit123
Copy link
Member

closing, let's continue the discussion here:
#2563

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

2 participants