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

Docs: is a server + agent on a single node installation discouraged with k3os? #624

Open EugenMayer opened 3 years ago

EugenMayer commented 3 years ago

Is far as i can see, the k3s defaults are installation server and agent on the same node ( single node ) by default. In k3os i neither can see any mentioning of that, rather it seems like the agent is expected to be a second node.

i did not use

  k3s_args:
  - server
  - "--disable-agent"

During the k3os installation (i did not define k3s_args at all) - was this a mistake because this is k3os default and i should have used

  k3s_args:
  - server

After the installation, i only see the master node

 kubectl get nodes
NAME         STATUS   ROLES    AGE   VERSION
k3os.<redacted>   Ready    master   51m   v1.18.9+k3s1

For k3s it seems to be different by default https://github.com/k3s-io/k3s/issues/1279

Are there any things that k3os does differently so a single node (server+agent) is broken compared to a "takeover" installation with and k3s script? Or are the pros/cons of single node with both types just the same?

Sorry if that question is missplaced - i understand that k3os is just a minimal OS to run k3s - the point i'am looking at is, are there any "differences" to non k3os setups with k3s. Thanks a lot

EugenMayer commented 3 years ago

I'am not sure if it discouraged or not (would love to hear a statement about this if any possible), but to enable the master node / server to also run pods, we just need to remove the master role

kubectl get nodes # note down your master node / server
kubectl label <yourmasternodename> node-role.kubernetes.io/master-

Now the server node also is allowed to run pods, running your k3os+k3s as a single node cluster without the need of an additional node as an agent.