Linux swapoff:/swapfile:swapoff失败:无法分配内存
运行kubeadm init时出现以下错误:Linux swapoff:/swapfile:swapoff失败:无法分配内存,linux,kubernetes,ubuntu-18.04,parallels,Linux,Kubernetes,Ubuntu 18.04,Parallels,运行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
[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失败:无法分配内存
我在并行桌面上使用Ubuntu虚拟机
free-m命令输出如下:
$free-m
可用的免费共享缓冲区/缓存总使用量
成员:979455871436377
交换:2047 695 1352
内存不足。您的计算机之所以能够生存,是因为您使用了一个交换文件(即,使用硬盘驱动器获得额外的伪RAM),但Kubernetes不支持该文件,因此它尝试关闭该文件,但失败了,因为您没有足够的RAM