Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help/Question] Multi machines cluster using k3d #408

Closed
dblas opened this issue Nov 18, 2020 · 3 comments
Closed

[Help/Question] Multi machines cluster using k3d #408

dblas opened this issue Nov 18, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request question Further information is requested
Milestone

Comments

@dblas
Copy link

dblas commented Nov 18, 2020

Hello to all,
I wondered if it would be possible to instantiate nodes on different machines using k3d instead of having all the nodes on the same machine.
For example : 3 machines with, for each one, 1 master node and a worker node all belonging to the same cluster.

What would be the tricks and or pbs to get in there?
Thank you.
db

@dblas dblas added the enhancement New feature or request label Nov 18, 2020
@iwilltry42 iwilltry42 added the question Further information is requested label Nov 25, 2020
@iwilltry42 iwilltry42 changed the title Multi machines cluster using k3d [Help/Question] Multi machines cluster using k3d Nov 25, 2020
@iwilltry42
Copy link
Member

Hey @dblas , thanks for opening this issue!
With the current version of k3 this is not officially "supported" and I haven't tried it personally (was possible with v1.x though, so I know that it works).
For best functionality though you may want to use --network host for not having to bother with ports.
If this is going to be a production-like setup, I'd recommend you to go with plain k3s instead to avoid all the pitfalls and limitations introduced by the additional docker layer.
Some starting points:

  1. create initializing server node: k3d node create --role server myfirstserver --k3s-server-arg '--cluster-init' --tls-san <IP-of-Host> --token somesecrettoken
  2. create the other nodes (servers and agents) like this: k3d node create --role server|agent myothernode --token somesecrettoken --env K3S_URL=https://<IP-of-myfirstserver-host>:6443

Disclaimer: haven't tested this, but I guess that's how I'd try it.

@iwilltry42 iwilltry42 self-assigned this Nov 25, 2020
@iwilltry42 iwilltry42 added this to the v4.3.0 milestone Feb 5, 2021
@iwilltry42 iwilltry42 modified the milestones: v4.4.5, Backlog Jun 11, 2021
@shahamit
Copy link

Would have been good to have this enhancement working since its very easy with k3d to create and delete clusters. Without k3d I found this link that demonstrates how to do with k3s.

Looking forward to set up a multi machine cluster with k3d.

@iwilltry42
Copy link
Member

Closing this in favor of the older issue over here: #280
Just keeping the backlog clean and collecting all information in a single place 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants