-
Notifications
You must be signed in to change notification settings - Fork 3.3k
urllib3 v2.4.0 on Python 3.13 doesn't work with EKS #2394
New issue
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
Comments
We've run into this issue as well. AWS support told us this is only the case with EKS clusters created with version 1.16 and below. Creating a new cluster would fix the issue, but updating does not. As a workaround: client_configuration = None
if sys.version_info >= (3, 13):
# https://docs.python.org/3/whatsnew/3.13.html#ssl
client_configuration = Configuration()
client_configuration.verify_ssl = False
api_client = ApiClient(configuration=client_configuration)
kubernetes.client.VersionApi(api_client) Of course, it's insecure to completely disable SSL verification, but it does avoid the issue. |
We ran into this as well, with an on-prem RKE 1.28 cluster. The issue seems to be related to a change in behavior in the urllib3 library starting with 2.4.0: https://github.com/urllib3/urllib3/releases/tag/2.4.0
This seems to have changed the default behavior of TLS connections made with urllib3, specifically on Python 3.13+ Workarounds include dow 8000 ngrading to Python 3.12, or downgrading urllib3 to 2.3.0. I suspect the fix for this in the |
We're also running into this issue with an EKS cluster that was created back in 2019. We need to keep the updates flowing, and it seems like the easiest solution for now is to pin urllib3 to v2.3.0, but that's not a viable long-term solution. We would also appreciate a way to configure urllib3 to use the old behaviour, without disabling TLS verification entirely. |
could you please file a PR for the fix? Thanks |
What do you see an acceptable fix as being? I guess you either can specify urllib3 should be a version <2.4.0, or perhaps expose an easy way to disable this new sticker check in urllib3? |
What happened (please include outputs or screenshots):
The following exception is raised whenever calling the Kubernetes API of an EKS cluster:
Full stacktrace
What you expected to happen:
The exception shouldn't be raised and the call to the Kubernetes API should be made successfully.
How to reproduce it (as minimally and precisely as possible):
Use the latest version of this project with urllib3 v2.4.0 on Python 3.13.
Anything else we need to know?:
This seems to be caused by the following change in urllib3 v2.4.0: issue, PR, which only takes effect on Python 3.13.
I've only experienced the issue with EKS, which must use self-signed certificates that aren't fully compatible with RFC 5280, notably because they don't provide an Authority Key Identifier.
I don't know if the same issue is the case of other Kubernetes providers.
Environment:
kubectl version
): v1.32.3-eks-bcf3d70python --version
): 3.13.3pip list | grep kubernetes
): 32.0.1The text was updated successfully, but these errors were encountered: