What would you like to be added:
I want K-bench to recognize the KUBECONFIG environment variable that I set.
Why is this needed:
The k-bench README tells the use to use kubectl get nodes to verify the cluster they are currently operating on. While this is a good way to check, it can be misleading due to not handling the KUBECONFIG variable in the code.
If the KUBECONFIG environment variable doesn't exist, kubectl uses the default kubeconfig file, $HOME/.kube/config.
If the KUBECONFIG environment variable does exist, kubectl uses an effective configuration that is the result of merging the files listed in the KUBECONFIG environment variable.
This small change will reduce the chances of running the tests on the wrong cluster while not introducing breaking changes.
What would you like to be added: I want K-bench to recognize the KUBECONFIG environment variable that I set.
Why is this needed: The k-bench README tells the use to use
kubectl get nodes
to verify the cluster they are currently operating on. While this is a good way to check, it can be misleading due to not handling the KUBECONFIG variable in the code.Quoting from Kubernetes docs:
This small change will reduce the chances of running the tests on the wrong cluster while not introducing breaking changes.