k3s-aws-terraform-cluster icon indicating copy to clipboard operation
k3s-aws-terraform-cluster copied to clipboard

server Keyword is missing

Open ashishworkspace opened this issue 3 years ago • 3 comments

ashishworkspace avatar Jun 06 '22 15:06 ashishworkspace

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?

garutilorenzo avatar Jun 06 '22 16:06 garutilorenzo

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 avatar Jun 07 '22 05:06 ashishworkspace

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

ashishworkspace avatar Jun 07 '22 05:06 ashishworkspace