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.

Home Page:https://technotim.live/posts/k3s-etcd-ansible/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QUESTION] Should I be able to use this playbook for single-node server installation?

neilknowscomputers opened this issue · comments

commented

Expected Behavior

I should be able to run k3s on a single machine acting as the master and node as I can do with a single-node server installation using the k3s binary

Current Behavior

When I run the playbook, the agent node fails to connect to the master on TASK [k3s_server : Verify that all nodes actually joined (check k3s-init.service if this fails

Steps to Reproduce

  1. Set the same IP/host for [master] and [node] in hosts.ini
  2. Run ansible-playbook site.yml -i inventory/my-cluster/hosts.ini

Context (variables)

Operating system: Ubuntu Jammy 22.04

Hardware: AMD64 - AWS EC2 - 4 procs - 16 GB mem - 100 GB HD

Variables Used

No change to default configs

Hosts

host.ini

[master]
my-aws-ec2-host

[node]
my-aws-ec2-host

[k3s_cluster:children]
master
node

Possible Solution