-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
certificate verify failed #1017
Comments
which OS are you running? SSL verification failures usually heavily depends on your environment setup. Please check out the SSL troubleshooting in readme: https://github.com/kubernetes-client/python#troubleshooting you could also try disabling SSL verification if you're doing some testing. Ref kubernetes-client/python-base#177 |
Looking at his file path I think it’s some version of Windows |
I miss the same problem. It seems that the packages of requirements.txt is statisfied. And I find that use python3 is working but not with python2. [root@VM_centos /data/code/python]# python -c "import ssl; print ssl.OPENSSL_VERSION"
OpenSSL 1.0.1e-fips 11 Feb 2013 [root@VM_centos /data/code/python]# pip freeze -r requirements.txt
google-auth==1.10.0
ipaddress==1.0.23
websocket-client==0.57.0
requests==2.6.0
requests-oauthlib==1.3.0
urllib3==1.25.7
## The following requirements were added by pip freeze:
Babel==0.9.6
backports.ssl-match-hostname==3.4.0.2
cachetools==4.0.0
chardet==2.2.1
Cheetah==2.4.4
Click==7.0
cloud-init==17.1
configobj==4.7.2
decorator==3.4.0
Flask==1.1.1
iniparse==0.4
iotop==0.6
IPy==0.75
itsdangerous==1.1.0
javapackages==1.0.0
Jinja2==2.10.3
jsonpatch==1.2
jsonpointer==1.9
jsonschema==2.3.0
kitchen==1.1.1
kubernetes===11.0.0-snapshot
lxml==3.2.1
M2Crypto==0.21.1
Markdown==2.4.1
MarkupSafe==1.1.1
nose==1.3.0
numpy==1.7.1
oauthlib==3.1.0
perf==0.1
pexpect==2.3
Pillow==2.0.0
policycoreutils-default-encoding==0.1
prettytable==0.7.2
pyasn1==0.4.8
pyasn1-modules==0.2.7
pycrypto==2.6.1
pycurl==7.19.0
Pygments==1.4
pygobject==3.14.0
pygpgme==0.3
pyliblzma==0.5.3
pyparsing==1.5.6
python-ldap==2.4.15
pyudev==0.15
pyxattr==0.5.1
PyYAML==3.12
rsa==4.0
seobject==0.1
sepolicy==1.1
slip==0.4.0
slip.dbus==0.4.0
urlgrabber==3.10
Werkzeug==0.16.0
yum-metadata-parser==1.1.4 [root@VM_centos /data/code]# pip install kubernetes
Requirement already satisfied (use --upgrade to upgrade): kubernetes in /usr/lib/python2.7/site-packages/kubernetes-11.0.0_snapshot-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): certifi>=14.05.14 in /usr/lib/python2.7/site-packages (from kubernetes)
Requirement already satisfied (use --upgrade to upgrade): six>=1.9.0 in /usr/lib/python2.7/site-packages (from kubernetes)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil>=2.5.3 in /usr/lib/python2.7/site-packages (from kubernetes)
Requirement already satisfied (use --upgrade to upgrade): setuptools>=21.0.0 in /usr/lib/python2.7/site-packages (from kubernetes)
Requirement already satisfied (use --upgrade to upgrade): pyyaml>=3.12 in /usr/lib64/python2.7/site-packages (from kubernetes)
Requirement already satisfied (use --upgrade to upgrade): google-auth>=1.0.1 in /usr/lib/python2.7/site-packages (from kubernetes)
Requirement already satisfied (use --upgrade to upgrade): websocket-client!=0.40.0,!=0.41.*,!=0.42.*,>=0.32.0 in /usr/lib/python2.7/site-packages (from kubernetes)
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.7/site-packages (from kubernetes)
Requirement already satisfied (use --upgrade to upgrade): requests-oauthlib in /usr/lib/python2.7/site-packages (from kubernetes)
Requirement already satisfied (use --upgrade to upgrade): urllib3>=1.24.2 in /usr/lib/python2.7/site-packages/urllib3-1.25.7-py2.7.egg (from kubernetes)
Requirement already satisfied (use --upgrade to upgrade): ipaddress>=1.0.17 in /usr/lib/python2.7/site-packages (from kubernetes)
Requirement already satisfied (use --upgrade to upgrade): rsa<4.1,>=3.1.4 in /usr/lib/python2.7/site-packages (from google-auth>=1.0.1->kubernetes)
Requirement already satisfied (use --upgrade to upgrade): pyasn1-modules>=0.2.1 in /usr/lib/python2.7/site-packages (from google-auth>=1.0.1->kubernetes)
Requirement already satisfied (use --upgrade to upgrade): cachetools<5.0,>=2.0.0 in /usr/lib/python2.7/site-packages (from google-auth>=1.0.1->kubernetes)
Requirement already satisfied (use --upgrade to upgrade): oauthlib>=3.0.0 in /usr/lib/python2.7/site-packages (from requests-oauthlib->kubernetes)
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.3 in /usr/lib/python2.7/site-packages (from rsa<4.1,>=3.1.4->google-auth>=1.0.1->kubernetes) |
I'm having this issue on Fedora 31. The CA is in my system trust anchors, Chrome likes it, kubectl likes it. I've tried it with the OpenSSL version is
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Had the same issue here, but found a solution for me - which may help some. Previously, even though SSL connection worked for But SSL connection failed as above, using the example code in (I had also checked that python is connecting to the correct host, and not our corporate proxy -which is another common problem here- using In the end, I found
So in my case the problem was using an unexpected CA file (and assuming all ssl client implementations behave the same!), and therefore an inability for more strict SSL clients to check the complete trust chain (which the API server cert does refer to). I fetched the right Rancher CA from a Rancher container in the right cluster |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
We're having the same issue. Unless the whole trust chain is in the kubeconfig's certificate-authority-data, the module will throw SSL: CERTIFICATE_VERIFY_FAILED. |
python 3.7
client 10.0.1
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='172.18.56.103', port=6443): Max retries exceeded with url: /api/v1/namespaces (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get issuer certificate (_ssl.c:1056)')))
Can't verify the certificate. What should I do?
The text was updated successfully, but these errors were encountered: