-
Notifications
You must be signed in to change notification settings - Fork 14
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
Honor KUBERNETES_SERVICE_HOST in k8s client #68
Comments
@Retna-Gjensidige Interesting. I'm not opposed to this at all, but I'm also not convinced that this will address your issues.
As far as I understand, nothing has changed with regard to how kubert or the policy controller discovers the Kubernetes API between these releases. Does the Is this related to an open Linkerd2 issue? It would be helpful to have some more details about your cluster configuration so we can be sure that we're working on the right thing. |
If this change is indeed needed, it's probably not appropriate to make this change in this repo. We're loading our kubernetes client configuration via https://github.com/kube-rs/kube-rs/blob/050bf9d23e32af9c1f65b3a01dda6f677e64055b/kube-client/src/config/mod.rs#L209-L235 |
I'm going to close this issue, since this repo isn't the right place to address this problem. If you can get as many details as possible in an issue in the Linkerd2 repo, we can help narrow down the source of the problem and identify the appropriate fix. Thanks! |
Note that the linked kube-rs code references https://kubernetes.io/docs/tasks/run-application/access-api-from-pod/#directly-accessing-the-rest-api, which says:
|
And note that support for these environment variables was explicitly removed from kube-rs in kube-rs/kube@dd0b258, as the (legacy) environment-based method is buggy. |
Well, I guess we clarified this: kube-rs/kube@dd0b258 happened. It's still worth getting a Linkerd2 issue so that others can get visibility into the issue you're seeing. It would be helpful to understand how your cluster setup diverges from the standard setup where the cluster-local service can be used. Then we can help engage the kube-rs maintainers to, perhaps, restore support for systems that don't support the standard access mechanism. |
@olix0r Thanks for taking the time to dig into the issue ❤️. Our requirement may be specific to Azure as we secure our AKS egress with a layer 7 firewall. Info here, plus Azure AKS has also support for the KUBERNETES_SERVICE_HOST now, release notes here We will address this issue in Linkerd2 repo as you suggested 🙏 |
This issue is for linkerd2/policy-controller where this lib is being used.
We are testing linkerd2 stable-2.12.0 and we see that policy-controller running in the Destination pod is not able to connect to the API-server and ends up with crash/restart loop.
Our current installation with linkerd2 stable-2.11.3 all is good with the policy-controller being able to access API server.
What we see is that policy-controller is not using the
KUBERNETES_SERVICE_HOST
env variable to connect to the API-server. Its usingkubernetes.default.svc
as the url to API-server.Would it be possible to have
kubert
honorKUBERNETES_SERVICE_HOST
andKUBERNETES_SERVICE_PORT
when communication to the API-server?Logs from
policy-controller
container:The text was updated successfully, but these errors were encountered: