安装kubelet时出错

时间:2018-02-23 03:42:17

标签: kubernetes

安装完成后我遇到问题,尝试运行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错误。我已禁用它但仍然出现错误

enter image description here

1 个答案:

答案 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