swapoff:/ swapfile:swapoff失败:无法分配内存

运行kubeadm init时出现以下错误:

[init] Using Kubernetes version: v1.16.2
[preflight] Running pre-flight checks
    [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
error execution phase preflight: [preflight] Some fatal errors occurred:
    [ERROR Swap]: running with swap on is not supported. Please disable swap
[preflight] If you know what you are doing,you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher

sudo swapoff -a swapoff: /swapfile: swapoff failed: Cannot allocate memory

我正在并行桌面上使用Ubuntu VM

free -m command output below: $ free -m total used free shared buff/cache available Mem: 979 455 87 1 436 377 Swap: 2047 695 1352

fd1803 回答:swapoff:/ swapfile:swapoff失败:无法分配内存

您没有足够的RAM。您的机器得以幸存,是因为您使用了交换文件(例如,使用硬盘驱动器来获取额外的伪RAM),但是Kubernetes不支持该文件,因此它试图关闭该文件,因为您没有足够的RAM而失败了。

本文链接:https://www.f2er.com/3141977.html

大家都在问