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

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

Closed neilknowscomputers closed 7 months ago

neilknowscomputers commented 7 months ago

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