[RFE] Provide further details when API server connectivity check fails
Current situation
Currently, the outcome of the check-apiserver-connectivity command is mainly succeeded or failed:
$ kubectl aks check-apiserver-connectivity --node aks-agentpool-27170680-vmss000000
Running...
Connectivity check: succeeded
$ echo $?
0
$ kubectl aks check-apiserver-connectivity --node aks-agentpool-27170680-vmss000000
Running...
Connectivity check: failed with returned value X: <stderr>
$ echo $?
X
However, in case of failure, the stderr could not be enough to understand what is the issue.
Impact
Output could not provide enough details to the user to understand where to start investigation.
Ideal future situation
When there's a failure, the outcome of check-apiserver-connectivity should be enough to understand, at least, when there is a problem with the DNS and when the API sever is actually unreachable.
Implementation options
Before proceeding with this implementation, find a way to simulate an issue on the DNS and verify what is the stderr of the command we are using to verify connectivity (currently kubectl --kubeconfig /var/lib/kubelet/kubeconfig version).
Hi, What should I set up to work on this? Do I need an azure account?
Hi, What should I set up to work on this? Do I need an azure account?
You'll need an AKS cluster to test it 🙂
How can I do that?
Maybe you can explore this to get some credits: https://azure.microsoft.com/en-us/pricing/member-offers/credit-for-visual-studio-subscribers and then follow this guide to create it.