k3d
k3d copied to clipboard
[FEATURE] Add ability to name agents/servers
Problem
I would like to be able to have different names for my node to help with discovery in tools like k9s.
If I (a) create the cluster and then (b) create the nodes I can achieve this.
But if I need to create the cluster and nodes at the same time i.e. via -agents flag then this is not possible. And some use cases e.g. per-node volumes are only possible using this approach
Solution
Either:
- Add a "k3d node rename" command.
- Add a new flag to k3d create cluster "--name KEY=VALUE[@NODE]"
Hi @nadenf , thanks for opening this issue!
So since you're talking about k9s, you're referring to the Kubernetes Node Name, right?
k3d only sets the "hostname" of the nodes (i.e. the container name), which is the default used by Kubernetes (K3s) as node name.
So you can use e.g. --k3s-arg "--node-name=mynode"@agent:0
to name the first agent (didn't test this).
@iwilltry42 .. That does indeed work.
Would be nice still to have a friendly config option.
Hi @iwilltry42, I'm new to k3d. Can i try this issue? I'll inform if i couldn't finish it.
Hi @shankeerthan-kasilingam, welcome to the project 🙂 Sure, go for it! Let me know if you need any help or insights.