运行 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 失败: 无法分配内存
我在并行桌面中使用 Ubuntu VM
free -m 命令输出如下:
$免费-m
可用的免费共享缓冲区/缓存总数
内存:979 455 87 1 436 377
兑换:2047 695 1352
您没有足够的内存。你的机器幸存下来,因为你使用了交换文件(即使用硬盘驱动器作为额外的伪 RAM),但 Kubernetes 不支持它,因此它尝试关闭它,但失败了,因为你没有足够的 RAM。
我是一名优秀的程序员,十分优秀!