kubectl-aks icon indicating copy to clipboard operation
kubectl-aks copied to clipboard

[RFE] Provide further details when API server connectivity check fails

Open blanquicet opened this issue 3 years ago • 4 comments

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).

blanquicet avatar Feb 16 '22 15:02 blanquicet

Hi, What should I set up to work on this? Do I need an azure account?

AdvH039 avatar Jun 10 '25 08:06 AdvH039

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 🙂

blanquicet avatar Jun 10 '25 15:06 blanquicet

How can I do that?

AdvH039 avatar Jun 10 '25 16:06 AdvH039

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.

blanquicet avatar Jun 10 '25 17:06 blanquicet