garutilorenzo / k3s-aws-terraform-cluster

Deploy an high available K3s cluster on Amazon AWS
GNU General Public License v3.0
150 stars 39 forks source link

server Keyword is missing #2

Open ashishworkspace opened 2 years ago

garutilorenzo commented 2 years ago

I don't think the server keyword is needed. From the docs:

Setting the K3S_URL parameter causes K3s to run in worker mode. The K3s agent will register with the K3s server listening at the supplied URL. The value to use for K3S_TOKEN is stored at /var/lib/rancher/k3s/server/node-token on your server node.

so if you don't specify K3S_URL k3s will run as server otherwise k3s will run as worker.

Are you submitting this PR for a particular reason or bug?

ashishworkspace commented 2 years ago

If you want to create multi master cluster setup than I think server keyword is important. I ran your code in AWS and was not able to connect all master together. Only one master joined the cluster. I fixed that issue using this server keyword.

ashishworkspace commented 2 years ago

https://rancher.com/docs/k3s/latest/en/installation/ha/#2-launch-server-nodes