Okay. i had the same error.
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'
failed: [nl-k8-01] (item=ip_vs) => {"ansible_loop_var": "item", "changed": false, "item": "ip_vs", "msg": "[Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'", "name": "ip_vs", "params": "", "state": "present"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'
failed: [nl-k8-02] (item=ip_vs) => {"ansible_loop_var": "item", "changed": false, "item": "ip_vs", "msg": "[Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'", "name": "ip_vs", "params": "", "state": "present"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'
failed: [nl-k8-03] (item=ip_vs) => {"ansible_loop_var": "item", "changed": false, "item": "ip_vs", "msg": "[Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'", "name": "ip_vs", "params": "", "state": "present"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'
failed: [nl-k8-01] (item=ip_vs_rr) => {"ansible_loop_var": "item", "changed": false, "item": "ip_vs_rr", "msg": "[Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'", "name": "ip_vs_rr", "params": "", "state": "present"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'
failed: [nl-k8-03] (item=ip_vs_rr) => {"ansible_loop_var": "item", "changed": false, "item": "ip_vs_rr", "msg": "[Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'", "name": "ip_vs_rr", "params": "", "state": "present"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'
failed: [nl-k8-02] (item=ip_vs_rr) => {"ansible_loop_var": "item", "changed": false, "item": "ip_vs_rr", "msg": "[Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'", "name": "ip_vs_rr", "params": "", "state": "present"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'
failed: [nl-k8-01] (item=ip_vs_wrr) => {"ansible_loop_var": "item", "changed": false, "item": "ip_vs_wrr", "msg": "[Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'", "name": "ip_vs_wrr", "params": "", "state": "present"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'
failed: [nl-k8-03] (item=ip_vs_wrr) => {"ansible_loop_var": "item", "changed": false, "item": "ip_vs_wrr", "msg": "[Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'", "name": "ip_vs_wrr", "params": "", "state": "present"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'
failed: [nl-k8-02] (item=ip_vs_wrr) => {"ansible_loop_var": "item", "changed": false, "item": "ip_vs_wrr", "msg": "[Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'", "name": "ip_vs_wrr", "params": "", "state": "present"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'
failed: [nl-k8-01] (item=ip_vs_sh) => {"ansible_loop_var": "item", "changed": false, "item": "ip_vs_sh", "msg": "[Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'", "name": "ip_vs_sh", "params": "", "state": "present"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'
failed: [nl-k8-03] (item=ip_vs_sh) => {"ansible_loop_var": "item", "changed": false, "item": "ip_vs_sh", "msg": "[Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'", "name": "ip_vs_sh", "params": "", "state": "present"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'
failed: [nl-k8-02] (item=ip_vs_sh) => {"ansible_loop_var": "item", "changed": false, "item": "ip_vs_sh", "msg": "[Errno 2] No such file or directory: '/lib/modules/5.15.0-73-generic/modules.builtin'", "name": "ip_vs_sh", "params": "", "state": "present"}
the reason was i tried to install k8s via kubespray inside lxd container.
thats why of course the folder /lib/modules was empty inside lxd container.
i dont know your case but:
- if you try to install k8s on usual linux host then file "modules.builtin"
is a part of package "linux-modules-5.2.0-generic"
- if you try to install k8s inside lxd container then go back to the
main host and load the following kernel modules:
br_netfilter
ip_vs
ip_vs_rr
ip_vs_wrr
ip_vs_sh
nf_conntrack
to be sure they are loaded every host boot use the following
# cat /etc/modules-load.d/modules.conf | grep -v '#'
br_netfilter
ip_vs
ip_vs_rr
ip_vs_wrr
ip_vs_sh
nf_conntrack
# systemctl restart systemd-modules-load
# systemctl status systemd-modules-load
the file in ansible that generates the error is the following:
$kubespray_folder/kubespray/roles/kubernetes/node/tasks/main.yml
hope it helps as it has done to me