There is no checking to identify if a kubeconfig file has been found which can lead to inaccurate output if there is no kubeconfig file found using the -k option.
Fix is to implement logic to exit the while loop if a match is not found.
This could have been identified with negative testing.