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 master nodes configuration #194

Closed rath17023 closed 1 year ago

rath17023 commented 1 year ago

Unable to complete installation. It appears that Configure kubectl cluster to https://{{ apiserver_endpoint | ansible.utils.ipwrap }}:6443] variable is not being filled correctly.

Expected Behavior

The variable should be filled with the virtual IP?

Current Behavior

The following error is produced on install for each of the master nodes.

image

Steps to Reproduce

  1. Installed 5 ubuntu cloud nodes on proxmox (3 master, 2 worker)
  2. Git clone of the repo
  3. Configured inventory for the cluster
  4. Ran site.yml

Context (variables)

Operating system: Ubuntu 20.04

Hardware: virtualized in proxmox

Variables Used

all.yml

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

flannel_iface: "eth0"

apiserver_endpoint: "192.168.100.200"

k3s_token: "NA"

extra_args: >-
  --flannel-iface={{ flannel_iface }}
  --node-ip={{ k3s_node_ip }}

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

metal_lb_speaker_tag_version: "v0.13.7"
metal_lb_controller_tag_version: "v0.13.7"

metal_lb_ip_range: "192.168.100.110-192.168.30.120"

Hosts

host.ini

[master]
192.168.100.201
192.168.100.202
192.168.100.203

[node]
192.168.100.210
192.168.100.211

[k3s_cluster:children]
master
node

Possible Solution

rath17023 commented 1 year ago

nvm rebuilt my ansible controller and now it works fine. I think the version may have been out of date.