-
-
Notifications
You must be signed in to change notification settings - Fork 307
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 didn't format correct kube_host_port
for IPv6 cluster
#874
Comments
Hi developer team, We want to do a release to patch this issue this week since our customer complained the service didn't work on the IPv6 cluster. I was wondering if there is any suggested workaround on this before the actual patch goes into live? We were just trying to use the default way to build the client, sample code:
|
Hey there. Thanks for the report and quick fix for this. We were not aware. A possible workaround for this is to make the client use the exported That said, with a good bugfix, this seems like a good time to make a release, so will try to start a release later today. |
Ok 0.71.0 is released with the fix and more. We can either close this issue as a result of the pr, or we can consider changing our in-cluster default for No one has said anything about the default on rustls since it was instated half a year ago in #587, and while the rustls load is lower, I would imagine it is a pretty safe thing to change at this point. |
Thanks for the fast reaction to get 0.71.0 out. Really appreciate your work. It seems still have issue with IPv6 support using
I think this might caused by using ip address to build ssl connect which ends up getting hostname mismatch. But I am not familiar with SSL so I am not sure how to fix it. Error line here. I was able enable |
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>
Fix for it has been merged to master. It's been tested on both TLS stacks, so you can try to pin kube to a git sha to test it before a new version is out. [dependencies.kube]
features = ["runtime", "client", "derive"]
git = "https://github.com/kube-rs/kube-rs.git"
rev = "dd0b2585729dab5c140ab96dc35c00484cc992bc" |
Current and expected behavior
Issue:
Get
InvalidAuthority
on IPv6 cluster usingkube::client::Client::try_default()
Sample error:
Cause:
kube_host_port()
inincluster_config.rs
didn't handle IPv6 address as expected.Expected address: "https://[fd49:683:e486::1]:443"
Actual address: "https://fd49:683:e486::1:443"
Possible solution
Option 1: Add extra logic in
kube_host_port()
Option 2: Use
KUBERNETES_PORT
with an adjustment of schema.Additional context
No response
Environment
EKS
Configuration and features
No response
Affected crates
No response
Would you like to work on fixing this bug?
yes
The text was updated successfully, but these errors were encountered: