K3s: Possible to run k3s on one node (server and agent together)?

Created on 7 Jan 2020  路  4Comments  路  Source: k3s-io/k3s

Is it possible to run the k3s server and agent on the same node like minikube or microk8s?

If yes, how is the setup / configuration process different? What is to consider?

kinquestion

Most helpful comment

When you install K3s with the curl script like below, the node will be both a server and agent.

curl -sfL https://get.k3s.io | sh -

So, by default the server and agent are deployed together on the same node.

All 4 comments

This is default behavior. But if you want run pod on the master with kubeadm its not a problem too. Just run
kubectl taint nodes --all node-role.kubernetes.io/master-

Would k3s + k3d meet your needs?

https://github.com/rancher/k3d - "Little helper to run Rancher Lab's k3s in Docker"

When you install K3s with the curl script like below, the node will be both a server and agent.

curl -sfL https://get.k3s.io | sh -

So, by default the server and agent are deployed together on the same node.

The current way of dealing with it is using labels, not taints - what @udanpe suggested does at least no longer work.

I commented this here https://github.com/rancher/k3os/issues/624#issuecomment-739491978 with an alternatives using labels - if anybody runs into this issue like i have :+1: Thanks for all the hints here!

Was this page helpful?
0 / 5 - 0 ratings