rancher / k3os

Purpose-built OS for Kubernetes, fully managed by Kubernetes.
https://k3os.io
Apache License 2.0
3.5k stars 403 forks source link

What is the expected behaviour of server_url? #605

Open danielo515 opened 4 years ago

danielo515 commented 4 years ago

Version (k3OS / kernel) k3os version v0.19.2-dev.4 5.4.0-48-generic #52 SMP Sat Sep 26 08:27:15 UTC 2020

Architecture x86_64

Hello. From a first read I thought server_url was to automatically set a node as agent and connect to a server specified at that url. However, in my experience it only serves the purpose of not making anything work. Instead of configure themselves as agents, what happens to me is that nodes try to configure themselves as a server and bind to that server_url. If there is a server already with that hostname, then it fails because duplicated name, if not, it just starts a proxy and then fails to obtain certificates and hence cluster won't start. What is the purpose of it and how it is expected to work? I would love to have some more explanations on the docs.

Thanks!

zimme commented 4 years ago

server_url needs to be used together with token. If you are using server_url´ withtoken` and still are getting this behaviour, maybe there's a bug here.

danielo515 commented 4 years ago

I'm using a token-secret (short text on the token prop). If I comment out the server_url both on server and agent, and add the following to the client configuration:

  k3s_args:
  - agent
  - "--server=https://kube01:6443"

agents work properly