Replies: 4 comments
-
Pretty sure k3d uses that as part of the docker container name / kubeconfig. When k3d starts k3s, it's running |
Beta Was this translation helpful? Give feedback.
-
Clusters don't have names, internally. You can give clusters names in your kubeconfig, but the cluster does not store its own name anywhere. |
Beta Was this translation helpful? Give feedback.
-
I understand now this "cluster name" is what is used in the kubeconfig generation. Does K3s generate this kubeconfig? If so, how does it know to use "default" as the name? Can this be an option we feed to that routine? i.e. In my explorations last night I dug through the k3d code and got as far as cluster.Name being added to a label... but couldn't see what that was applied to. Was it even a kubernetes label? Could have been attached to the containers |
Beta Was this translation helpful? Give feedback.
-
Which kubeconfig file are you referring to? K3s generates the admin kubeconfig at /etc/rancher/k3s/k3s.yaml. This will only ever contain a 'default' cluster entry. K3d manages kubeconfig files in your home directory (traditionally |
Beta Was this translation helpful? Give feedback.
-
I'm at a loss on how to name the cluster when running
k3s server
. k3d hask3d cluster create <cluster-name>
so there must be some way, I just can't grok it. Thanks.Beta Was this translation helpful? Give feedback.
All reactions