We now make sure that we can reach a cluster before we attempt to register it. We also make sure that the user has kubectl installed and provide better support if we do not.
Changes
We were checking the wrong version when using kubectl. It was grabbing the client version and not the server version.
Using the same version check we now make sure a cluster is reachable before moving forward.
Added a requiresKubectl function to make sure it is installed. Long term we should use the Plugin system for this, but now at least we provide the user with more information than before.
Tests
All tests run
Tested on machine without kubectl installed
Tested on an unreachable cluster
Tested with kubectl installed and a reachable cluster
Overview
We now make sure that we can reach a cluster before we attempt to register it. We also make sure that the user has kubectl installed and provide better support if we do not.
Changes
requiresKubectl
function to make sure it is installed. Long term we should use the Plugin system for this, but now at least we provide the user with more information than before.Tests
Pictures