techno-tim / k3s-ansible

The easiest way to bootstrap a self-hosted High Availability Kubernetes cluster. A fully automated HA k3s etcd install with kube-vip, MetalLB, and more. Build. Destroy. Repeat.
https://technotim.live/posts/k3s-etcd-ansible/
Apache License 2.0
2.41k stars 1.05k forks source link

Error during playbook execution #143

Closed joncy92 closed 1 year ago

joncy92 commented 1 year ago

Ansible playbook for deploying k3s fails to complete

Expected Behavior

K3s deploys with master nodes and agent nodes based on all.yaml and hosts.ini with kube-vip without error

Current Behavior

During execution of the ansible-playbook the "Configure kubectl cluster" step fails. Error can be viewed here: https://pastebin.com/ag3kUgWW Kube-vip also doesn't respond to ping or seem to deploy

Steps to Reproduce

1.Create ubuntu 22.04.1 servers using cloud-init on proxmox 2.Configure all.yml and hosts.ini

  1. Run requirements playbook 4.Run k3s playbook

Context (variables)

Operating system: Ubuntu server 22.04.1

Hardware: Proxmox running on: MB: Supermicro x10DRL-i CPU: 2x Intel Xeon E5-2660 v4 RAM: 126GiB ECC RAM

VMs: SeasBIOS i440fx machine 20GiB root disk 28 CPUs 8GiB RAM

Variables Used

all.yml

k3s_version: "v1.24.6+k3s1"
ansible_user: NA
systemd_dir: "/etc/systemd/system"

flannel_iface: "eth0"

apiserver_endpoint: "192.168.10.50"

k3s_token: "NA"

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 }}"

kube_vip_tag_version:  "v0.5.5"

metal_lb_speaker_tag_version: "v0.13.6"
metal_lb_controller_tag_version: "v0.13.6"

metal_lb_ip_range: "192.168.10.40-192.168.10.49"

Hosts

host.ini

[master]
192.168.10.51
192.168.10.52
192.168.10.53

[node]
192.168.10.57
192.168.10.58
192.168.10.59

[k3s_cluster:children]
master
node

Possible Solution

It seems kube-vip is not deploying properly

8270647 commented 1 year ago

Try running: ansible-galaxy collection install -r ./collections/requirements.yml prior to playbook execution.

joncy92 commented 1 year ago

Try running: ansible-galaxy collection install -r ./collections/requirements.yml prior to playbook execution.

I'll update the steps but I've already done that.