安装完成后我遇到问题,尝试运行kubelet version
时遇到error: failed to run Kubelet: Running with swap on is not supported, please disable swap! or set --fail-swap-on flag to false. /proc/swaps contained
错误。我已禁用它但仍然出现错误
答案 0 :(得分:0)
Ansible
- name: swap - remove current swaps from fstab
lineinfile:
dest: /etc/fstab
regexp: '^/[\S]+\s+none\s+swap '
state: absent
- name: Restart server
command: /sbin/shutdown -r 1
async: 0
poll: 0
ignore_errors: true
- pause:
prompt: "The system has restarted to complete disabling swap (otherwise error with kubeadm)..."
minutes: 1