Open dbackeus opened 7 months ago
This is not fatal in any way, you can use talosctl kubeconfig
command to fetch kubeconfig
any other way. Your cluster is fine.
That's a good point.
I guess the message could be something like Warning: Found multiple config file entries in the KUBECONFIG environment variable. Use talosctl --context <cluster-name> kubeconfig to manually generate a kubeconfig file.
instead.
Note that this issue is not supposed to be a bug report but a suggestion for improving the user experience around talosctl cluster create
, which may well be the first interaction a user has with Talos.
Issue
If
talosctl cluster create
is run with multiple entries in theKUBECONFIG
environment variable, the command proceeds to create the cluster, but instead of ending with a kubeconfig merge and outputting the state of the cluster it ends abruptly with the ambiguous messagemultiple kubeconfig files defined
.This is not helpful to the user since it does not communicate that something has gone wrong, or what has gone wrong.
Proposed improvements
KUBECONFIG
entries could be done at the very start of the command, instead of the end, to avoid ending up in a werid state~/.kube/config
file is part of theKUBECONFIG
list, that could be used as a default even if multiple entries are presentKUBECONFIG
environment variable. Please re-run the command with a single config file to be used for merging configuration for the newly created cluster."