Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFP: Better error message when failing to contact the API server #21148

Open
margamanterola opened this issue Aug 31, 2022 · 1 comment
Open
Assignees
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.

Comments

@margamanterola
Copy link
Member

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.

@margamanterola margamanterola added the kind/feature This introduces new functionality. label Aug 31, 2022
@aanm aanm added good-first-issue Good starting point for new developers, which requires minimal understanding of Cilium. sig/k8s Impacts the kubernetes API, or kubernetes -> cilium internals translation layers. labels Sep 22, 2022
@brandshaide
Copy link
Contributor

@aanm I'd like to work on this, can you assign me?

pando85 added a commit to pando85/homelab that referenced this issue Mar 10, 2024
When kube-proxy is removed cilium cannot contact kube api-server:
cilium/cilium#21148
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

3 participants