Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Kubernetes version and try to get CI passing #126

Merged
merged 18 commits into from
Oct 26, 2022
Merged

Conversation

geerlingguy
Copy link
Owner

Fixes #125.

@geerlingguy
Copy link
Owner Author

Huh... on the Mac I'm getting this:

"Failed to run kubelet" err="failed to run Kubelet: could not detect clock speed from output: \"processor\\t: 0\\nBogoMIPS\\t: 48.00\\n..." component=kubelet

Going to try setting the cgroupfs volume mount as rw (I had it ro) as suggested here: k0sproject/k0s#1493

@geerlingguy geerlingguy changed the title Update Kubernetes version to 1.25, see what happens. Update Kubernetes version, see what happens. Sep 15, 2022
@rhino5oh
Copy link

rhino5oh commented Oct 12, 2022

I was able to get this branch to work for installing k8s on a group of Ubuntu 20.04 machines. A few things:

  • I set up containerd on each node first, following the 'option 2' using apt-get here
  • I then had to edit /etc/containerd/config.toml on each node and remove "CRI" from the disabled_plugins list. I then added the blurb about setting SystemdCgroup = true as explained here and restarted containerd

^ I get that these two bullet points are really outside of the scope for your role, but just putting them here for complete-ness. For your role specifically, I had to:

  • Add net.ipv4.ip_forward to your Let iptables see bridged traffic task (To avoid preflight errors when the nodes were joining the cluster) AND I wrapped that entire file with a become block (become: yes, become_user: root, become_method: sudo) Otherwise, it complained: "cannot stat /proc/sys/net/ipv4/ip-forward: No such file or directory"

EDIT: the become block may have not been necessary. I think I was doing ip-forward instead of ip_forward and maybe that was the cause of the issue. I'll have to retry some more, but either way I think you need to add net.ipv4.ip_forward to that task to enable ip forwarding

@rhino5oh
Copy link

Ok update. I needed the become block and I also needed to ensure that the br_netfilter module was enabled in order to modify bridge-nf-call-iptables. Here's the whole sysctl-setup.yml file I used:

---
- block:
  
  - name: Enable br_netfilter module
    modprobe:
      name: br_netfilter
      state: present
    
  - name: Ensure procps is installed.
    package:
      name: "{{ procps_package }}"
      state: present
    when: >
      ansible_distribution != 'Debian'
      or ansible_distribution_major_version | int < 10

  # See: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#letting-iptables-see-bridged-traffic
  - name: Let iptables see bridged traffic.
    sysctl:
      name: "{{ item }}"
      value: '1'
      state: present
    loop:
      - net.bridge.bridge-nf-call-iptables
      - net.bridge.bridge-nf-call-ip6tables
      - net.ipv4.ip_forward
    when: >
      ansible_distribution != 'Debian'
      or ansible_distribution_major_version | int < 10

  become: yes
  become_user: root
  become_method: sudo

@geerlingguy geerlingguy changed the title Update Kubernetes version, see what happens. Update Kubernetes version and try to get CI passing Oct 26, 2022
@geerlingguy geerlingguy merged commit 86ce85e into master Oct 26, 2022
@geerlingguy geerlingguy deleted the fix-ci-updates branch October 26, 2022 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI Currently broken - kubelet won't start in GitHub Actions
2 participants