CFP: Better error message when failing to contact the API server #21148
Labels
good-first-issue
Good starting point for new developers, which requires minimal understanding of Cilium.
kind/feature
This introduces new functionality.
sig/k8s
Impacts the kubernetes API, or kubernetes -> cilium internals translation layers.
Cilium Feature Proposal
Is your feature request related to a problem?
Yes, the problem is that sometimes the API server might not be reachable. Currently, there's an entry in the getting started guide that mentions the error message and indicates one possible solution:
https://docs.cilium.io/en/v1.12/gettingstarted/kind/#unable-to-contact-k8s-api-server
But that issue is not necessarily the reason why the API server might be unreachable. For example, it's possible that kube-proxy is crash looping, as described in this issue: kubernetes-sigs/kind#2240
If kube-proxy is not running, then the API server can't be reached (because Cilium tries to connect to kube-apiserver via ClusterIP which gets provisioned by kube-proxy).
Describe the feature you'd like
We should improve the error message to give more information about what are the possible reasons why the API server couldn't be contacted. Try to give a more informative error than just "no route to host".
(Optional) Describe your proposed solution
When not replacing KubeProxy, the error message could have a callout with regards to checking whether kube-proxy is running and when KPR=strict, it could say something like "Did you specify kube-apiserver node IP addr?"
If we can check whether kube-proxy is reachable and say that in the error, that would be even better.
The text was updated successfully, but these errors were encountered: