In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article focuses on "Kubernetes etcd data viewing and migration methods", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "Kubernetes's etcd data viewing and migration method".
1. View etcd data kubeadm default installation
The methods are as follows:
ETCDCTL_API=3 etcdctl-endpoints= https://[127.0.0.1]:2379\-cacert=/etc/kubernetes/pki/etcd/ca.crt\-cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt\-key=/etc/kubernetes/pki/etcd/healthcheck-client.key\ get / registry/deployments/default-prefix-keys-only
Because the etcd instance in Kubernetes uses https, you need to specify information such as certificate, that is, the cacert/cert/key parameter.
The above parameters are that when using the default installation of kubeadm, the certificate is located in the / etc/kubernetes/pki directory of the host, and you can use the above command to access it after installing etcdctl-client.
Cfssl certificate installation
Using the etcd cluster installed with cfssl certificates, the directory of certificates can be customized and the certificate format is * .pem. The methods are as follows:
ETCDCTL_API=3 etcdctl-endpoints= https://[10.1.1.202]:2379\-cacert=/etc/kubernetes/pki/etcd-certs/ca.pem\-cert=/etc/kubernetes/pki/etcd-certs/client.pem\-key=/etc/kubernetes/pki/etcd-certs/client-key.pem\ get / registry/deployments/default-prefix-keys-only
I put the certificate here in the / etc/kubernetes/pki/etcd-certs directory.
2. Migrate etcd data
Use the etcd make-mirror command to do this.
The following command transfers the etcd instance data installed using kubeadm to the etcd cluster installed using cfssl.
ETCDCTL_API=3 etcdctl make-mirror\-endpoints= https://[127.0.0.1]:2379\-cacert=/etc/kubernetes/pki/etcd/ca.crt\-cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt\-key=/etc/kubernetes/pki/etcd/healthcheck-client.key\-dest-cacert=/etc/kubernetes/pki/etcd-certs/ca.pem\-dest-cert=/etc/kubernetes/pki/etcd-certs/client.pem\- Dest-key=/etc/kubernetes/pki/etcd-certs/client-key.pem\ https://[10.1.1.202]:2379
You can then use the method of 1 above to view the data.
At this point, I believe you have a deeper understanding of "Kubernetes's etcd data viewing and migration methods". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.