-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
In-cluster config uses an IP address instead of recommended DNS name #587
Comments
As an immediate workaround, it appears that adding an environment variable |
Oh interesting. Based on that documentation it looks like we are using a legacy / misguided method. Our method is not mentioned there anymore, and can test + fix this pretty easily. Thanks for the report! |
I assume this crate was modelled off the Golang libraries, where I found this interesting little comment ;) https://github.com/kubernetes/client-go/blob/7a90b08589bbf0d36a27041d5491b7b8d5430f15/rest/config.go#L506-L512 |
hah! that's actually current master! practice what you preach, hey. |
Draft PR for this at in #597 |
This is the recommended, and only documented method on https://kubernetes.io/docs/tasks/run-application/access-api-from-pod/ The legacy method has issues with ipv6 and it's time to retire it. We trialled the new method for 6months via #587 without any reports. Closes #874 Signed-off-by: clux <sszynrae@gmail.com>
* Switch to kubernetes dns for incluster url everywhere This is the recommended, and only documented method on https://kubernetes.io/docs/tasks/run-application/access-api-from-pod/ The legacy method has issues with ipv6 and it's time to retire it. We trialled the new method for 6months via #587 without any reports. Closes #874 Signed-off-by: clux <sszynrae@gmail.com> * remove code for legacy methods, was never actually made public Signed-off-by: clux <sszynrae@gmail.com> * simplify kube_dns fn with less unwraps Signed-off-by: clux <sszynrae@gmail.com>
When inferring in-cluster config, the code looks for
KUBERNETES_SERVICE_HOST
andKUBERNETES_SERVICE_PORT
and creates a URL based on that, e.g.https://10.43.0.1:443
. This breaks when using rustls-tls instead of openssl, due to missing support in the upstream libraries as noted in #123 (comment) and other places.The recommended way to access the API server from a pod is with the
kubernetes.default.svc
DNS name, not with the service IP, which would avoid the rustls issue entirely. Is there a reason kube-rs uses the service IP directly?The text was updated successfully, but these errors were encountered: