siderolabs / talos

Talos Linux is a modern Linux distribution built for Kubernetes.
https://www.talos.dev
Mozilla Public License 2.0
6.39k stars 514 forks source link

talosctl cluster create should handle multiple KUBECONFIG files better #8503

Open dbackeus opened 5 months ago

dbackeus commented 5 months ago

Issue

If talosctl cluster create is run with multiple entries in the KUBECONFIG 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 message multiple 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

smira commented 5 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.

dbackeus commented 5 months ago

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.