当前位置:网站首页>Illustration of etcd access in kubernetes
Illustration of etcd access in kubernetes
2022-07-02 07:13:00 【wuzd】
Catalog
1. stay k8s Check the installed etcd
4. View all nodes in the cluster (etcdctl member list)
5. Write test data (etcdctl put /testdir/testkey "Hello world1")
6. Read out the test data (etcdctl get /testdir/testkey)
Preface
Kubernetes Medium etcd visit .
Normal installation k8s, Didn't deliberately install etcd, utilize K8s Attached to etcd, Feel the etcd Read and write operations .
Tips : The following is the main body of this article , The following cases can be used for reference
One 、etcd What is it? ?
etcd It's a distributed one key-value Storage database .
Two 、 Use steps
1. stay k8s Check the installed etcd
kubectl get pod -n kube-system | grep etcd
2. Get into k8s Of etcd
kubectl exec -ti etcd-s205 -n kube-system -- /bin/sh
etcd-s205 yes etcd Of pod Name ,
kube-system yes etcd In the namespace
3. Appoint etcd Version of 3
export ETCDCTL_API=3
4. View all nodes in the cluster (etcdctl member list)
The original order was etcdctl member list, Will make mistakes ,
"level":"warn","ts":"2022-01-23T07:20:36.684Z","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-f4a0c47f-bfc5-4e20-938f-fd9f60be32fd/127.0.0.1:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: all SubConns are in TransientFailure, latest connection error: connection closed"}
Error: context deadline exceeded
"level":"warn","ts":"2022-01-23T07:20:36.684Z","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-f4a0c47f-bfc5-4e20-938f-fd9f60be32fd/127.0.0.1:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: all SubConns are in TransientFailure, latest connection error: connection closed"}
Error: context deadline exceeded
To access with certificate parameters ,
Added certificate parameters
--cacert=/etc/kubernetes/pki/etcd/ca.crt
--cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt
--key=/etc/kubernetes/pki/etcd/healthcheck-client.key
etcdctl --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt --key=/etc/kubernetes/pki/etcd/healthcheck-client.key member list
5. Write test data (etcdctl put /testdir/testkey "Hello world1")
etcdctl --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt --key=/etc/kubernetes/pki/etcd/healthcheck-client.key put /testdir/testkey "Hello world1"
6. Read out the test data (etcdctl get /testdir/testkey)
etcdctl --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt --key=/etc/kubernetes/pki/etcd/healthcheck-client.key get /testdir/testkey
summary
k8s Medium etcd, Add the certificate parameters , You can test and learn directly .
边栏推荐
- php中的数字金额转换大写数字
- JS create a custom JSON array
- php中在二维数组中根据值返回对应的键值
- MySQL index
- Oracle rman半自动恢复脚本-restore阶段
- Build FRP for intranet penetration
- Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
- Oracle RMAN automatic recovery script (migration of production data to test)
- sparksql数据倾斜那些事儿
- 在php的开发环境中如何调取WebService?
猜你喜欢
ORACLE EBS ADI 开发步骤
Only the background of famous universities and factories can programmers have a way out? Netizen: two, big factory background is OK
MapReduce concepts and cases (Shang Silicon Valley Learning Notes)
Redis -- cache breakdown, penetration, avalanche
Explanation and application of annotation and reflection
TCP攻击
SQLI-LABS通关(less6-less14)
sqli-labs通關匯總-page2
SQLI-LABS通关(less2-less5)
Sqli labs customs clearance summary-page2
随机推荐
In depth study of JVM bottom layer (IV): class file structure
Uniapp introduces local fonts
Data warehouse model fact table model design
Network security -- intrusion detection of emergency response
php中在二维数组中根据值返回对应的键值
ORACLE EBS中消息队列fnd_msg_pub、fnd_message在PL/SQL中的应用
MapReduce concepts and cases (Shang Silicon Valley Learning Notes)
图解Kubernetes中的etcd的访问
中年人的认知科普
Redis -- cache breakdown, penetration, avalanche
Oracle EBS ADI development steps
Sqli-labs customs clearance (less1)
MySQL中的正则表达式
ORACLE EBS DATAGUARD 搭建
ssm人事管理系统
Cve - 2015 - 1635 (ms15 - 034) réplication de la vulnérabilité d'exécution de code à distance
Oracle EBS database monitoring -zabbix+zabbix-agent2+orabbix
2021-07-19C#CAD二次开发创建多线段
php中时间戳转换为毫秒以及格式化时间
类加载器及双亲委派机制