TASK [k3s/master : Init cluster inside the transient k3s-init service] Fails on Ubuntu 22.04 #178
-
Expected BehaviorPlaybook should run and setup K3S on the nodes. Current BehaviorErrors out on the task Init cluster inside the transient k3s-init service The same error message is repeated for all 3 master nodes. Steps to Reproduce
Context (variables)Operating system: Ubuntu 22.04 Hardware: Proxmox running on Lenovo M910q MFF PC Variables Used
k3s_version: v1.24.8+k3s1
# this is the user that has ssh access to these machines
ansible_user: k3s-admin
systemd_dir: /etc/systemd/system
# Set your timezone
system_timezone: "Europe/Stockholm"
# interface which will be used for flannel
flannel_iface: "eth0"
# apiserver_endpoint is virtual ip-address which will be configured on each master
apiserver_endpoint: "10.10.10.130"
# k3s_token is required masters can talk together securely
# this token should be alpha numeric only
k3s_token: "3CjpRV4pnDEb9vC2Cw2y3CjpRV4pnDEb9vC2Cw2y"
# The IP on which the node is reachable in the cluster.
# Here, a sensible default is provided, you can still override
# it for each of your hosts, though.
k3s_node_ip: '{{ ansible_facts[flannel_iface]["ipv4"]["address"] }}'
# Disable the taint manually by setting: k3s_master_taint = false
k3s_master_taint: "{{ true if groups['node'] | default([]) | length >= 1 else false }}"
# these arguments are recommended for servers as well as agents:
extra_args: >-
--flannel-iface={{ flannel_iface }}
--node-ip={{ k3s_node_ip }}
# change these to your liking, the only required are: --disable servicelb, --tls-san {{ apiserver_endpoint }}
extra_server_args: >-
{{ extra_args }}
{{ '--node-taint node-role.kubernetes.io/master=true:NoSchedule' if k3s_master_taint else '' }}
--tls-san {{ apiserver_endpoint }}
--disable servicelb
--disable traefik
extra_agent_args: >-
{{ extra_args }}
# image tag for kube-vip
kube_vip_tag_version: "v0.5.7"
# image tag for metal lb
metal_lb_speaker_tag_version: "v0.13.7"
metal_lb_controller_tag_version: "v0.13.7"
# metallb ip range for load balancer
metal_lb_ip_range: "10.10.10.210-10.10.10.250" Hosts
[master]
10.10.10.131
10.10.10.132
10.10.10.133
[node]
10.10.10.134
10.10.10.135
[k3s_cluster:children]
master
node Possible SolutionFull Ansible Playbook Recap
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This scenario works in CI, it actually built the cluster last night so it seems like it might be a config issue? Also, be sure that you've checked each step of the troubleshooting guide. Most errors have more to do with your local setup. |
Beta Was this translation helpful? Give feedback.
-
It seems i went ahead to fast with creating an issue. I updated Ansible on my control node and re-cloned the repo + created new hosts.ini and all.yml. After doing this the playbook ran as it should. Thanks for all the great work, i really enjoy your videos! Feel free to close the discussion/issue! |
Beta Was this translation helpful? Give feedback.
This scenario works in CI, it actually built the cluster last night so it seems like it might be a config issue?
https://github.com/techno-tim/k3s-ansible/actions/runs/3635861028
Also, be sure that you've checked each step of the troubleshooting guide. Most errors have more to do with your local setup.
#20