geerlingguy/raspberry-pi-dramble

Install has fatal error on pi bramble

illegitimate-egg opened this issue · 3 comments

When running main.yml, I receive a critical error on task TASK [geerlingguy.kubernetes : Join node to Kubernetes master]

The error looks like this:

fatal: [kube2]: FAILED! => changed=true 
  cmd: |-
    kubeadm join 192.168.1.51:6443 --token 8prjav.8s1ujy07uvgnqfo1     --discovery-token-ca-cert-hash sha256:726b2d09a6a656c7a6392b00cace5a3b8065556e9adefe1bcd2c564fa3999821
  delta: '0:00:01.282340'
  end: '2022-07-29 20:03:45.018586'
  msg: non-zero return code
  rc: 1
  start: '2022-07-29 20:03:43.736246'
  stderr: |2-
            [WARNING SystemVerification]: missing optional cgroups: hugetlb
    error execution phase preflight: [preflight] Some fatal errors occurred:
            [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist
            [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1
    [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
  stderr_lines: <omitted>
  stdout: '[preflight] Running pre-flight checks'
  stdout_lines: <omitted>
fatal: [kube3]: FAILED! => changed=true 
  cmd: |-
    kubeadm join 192.168.1.51:6443 --token 8prjav.8s1ujy07uvgnqfo1     --discovery-token-ca-cert-hash sha256:726b2d09a6a656c7a6392b00cace5a3b8065556e9adefe1bcd2c564fa3999821
  delta: '0:00:02.114068'
  end: '2022-07-29 20:03:46.908983'
  msg: non-zero return code
  rc: 1
  start: '2022-07-29 20:03:44.794915'
  stderr: |2-
            [WARNING SystemVerification]: missing optional cgroups: hugetlb
    error execution phase preflight: [preflight] Some fatal errors occurred:
            [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist
            [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1
    [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
  stderr_lines: <omitted>
  stdout: '[preflight] Running pre-flight checks'
  stdout_lines: <omitted>

and when ever I try to connect (locally or remotely) using kubectl I'm left with this error:

  • Locally: The connection to the server localhost:8080 was refused - did you specify the right host or port?
  • Remotely: The connection to the server 192.168.1.51:6443 was refused - did you specify the right host or port?

help?

@illegitimate-egg this helped for me:

ansible all -i inventory -m shell -a "modprobe br_netfilter" -b -B 60 -P 0

Before that, it gave this:

root@kube1:/home/pi# cat /proc/sys/net/bridge/bridge-nf-call-iptables
cat: /proc/sys/net/bridge/bridge-nf-call-iptables: No such file or directory

Afterward:

root@kube1:/home/pi# cat /proc/sys/net/bridge/bridge-nf-call-iptables
1
stale commented

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale commented

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.