Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cli: add the cluster name to the error message
- When you ask for a kubeconfig file for a named cluster (i..e not the default "kind"), instead of getting the (cryptic) message: "could not locate any control plane nodes", also return the name of the cluster, and a hint to what the user should maybe supply (the --name option). - Note: Did not find any existing tests for this file, nor which mock libraries we should use to mock the dependencies? Testing Done: Create a named cluster and tested the `get kubeconfig` option: ``` $ make build unit verify $ ./bin/kind create cluster --name mytest $ ./bin/kind get kubeconfig ERROR: could not locate any control plane nodes for cluster named 'kind'. Use the --name option to select a different cluster $ ./bin/kind get kubeconfig --name mytest apiVersion: v1 clusters: - cluster: certificate-authority-data: LS0tLS[...] ``` Bug Number: kubernetes-sigs#2205
- Loading branch information