Skip to content
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

Python etcd3 client library is not able to read ca cert #2614

Open
oshi36 opened this issue Sep 4, 2024 · 1 comment
Open

Python etcd3 client library is not able to read ca cert #2614

oshi36 opened this issue Sep 4, 2024 · 1 comment

Comments

@oshi36
Copy link

oshi36 commented Sep 4, 2024

I am trying to take a snapshot of etcd via etcd3 python client library and my code looks like this :

import etcd3
 etcd = etcd3.client(
                 host='xx.xx.xx.xx',
                 port='2379',
                 cert_cert='/etc/kubernetes/pki/etcd/server.crt',
                 cert_key='/etc/kubernetes/pki/etcd/server.key',
                 ca_cert='/etc/kubernetes/pki/etcd/ca.crt'
               )
           print("Client connected:", etcd)
           etcd.snapshot('etcd_backup.db')
           print("Snapshot taken successfully.")
   except Exception as e:
            print("Error:", e)

I am getting this error
image

And if I remove the ca_cert path then I get ETCD connection failed.

What did you expect to happen?
I expect etcd3 client to recognize ca cert and get connected to etcd

How can we reproduce it (as minimally and precisely as possible)?
Install pip install etcd3 python etcd client library

Etcd version
image

@oshi36
Copy link
Author

oshi36 commented Sep 4, 2024

@kragniz please help me in fixing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant