Closed Rina-Y closed 5 months ago
Additional Information: My group_vars only included the variables that the sample said was necessary for an installation without using calico or cilium.
These are the included variables, but I used the sample values for timezone, token, and IPs.
---
k3s_version: v1.29.2+k3s1
system_timezone: "Your/Timezone"
systemd_dir: /etc/systemd/system
flannel_iface: "eth0"
apiserver_endpoint: "192.168.30.222"
k3s_token: "some-SUPER-DEDEUPER-secret-password"
k3s_node_ip: "{{ ansible_facts[(cilium_iface | default(calico_iface | default(flannel_iface)))]['ipv4']['address'] }}"
k3s_master_taint: "{{ true if groups['wvm'] | default([]) | length >= 1 else false }}"
extra_args: >-
{{ '--flannel-iface=' + flannel_iface if calico_iface is not defined and cilium_iface is not defined else '' }}
--node-ip={{ k3s_node_ip }}
extra_server_args: >-
{{ extra_args }}
{{ '--node-taint node-role.kubernetes.io/master=true:NoSchedule' if k3s_master_taint else '' }}
{% if calico_iface is defined or cilium_iface is defined %}
--flannel-backend=none
--disable-network-policy
--cluster-cidr={{ cluster_cidr | default('10.52.0.0/16') }}
{% endif %}
--tls-san {{ apiserver_endpoint }}
--disable servicelb
--disable traefik
extra_agent_args: >-
{{ extra_args }}
kube_vip_tag_version: "v0.7.2"
metal_lb_type: "native"
metal_lb_mode: "layer2"
metal_lb_speaker_tag_version: "v0.14.3"
metal_lb_controller_tag_version: "v0.14.3"
metal_lb_ip_range: "192.168.30.80-192.168.30.90"
group_name_master: 'control'
I was running this collection via galaxy for a larger system I am setting up, and I had decided not to use cilium since it looks like it's still being worked on and went with the default flannel for now.
I only included the group_vars I needed, excluding all vars for cilium and calico. I received an error when it was trying to call the metallb tasks in both the k3s_server and k3s_server_post roles. I just quickly fixed it for myself in my collection copy, then have set up a pull request to fix it.
Here is the actual error:
See #513 for the fix.