etcd
程序员文章站
2022-07-13 22:32:25
...
查看集群节点信息
etcdctl --ca-file=/etc/kubernetes/ssl/ca.pem member list
etcdctl --ca-file=/etc/kubernetes/ssl/ca.pem cluster-health
查询目录信息
etcdctl ls /
查询文件内容
etcdctl get /kube-centos/network/config
配置文件
[[email protected] ~]# cat /lib/systemd/system/etcd.service
[Unit]
Description=Etcd Server
After=network.target
After=network-online.target
Wants=network-online.target
Documentation=https://github.com/coreos
[Service]
Type=notify
WorkingDirectory=/var/lib/etcd/
ExecStart=/usr/local/bin/etcd \
--name=chenzg \
--cert-file=/etc/kubernetes/ssl/kubernetes.pem \
--key-file=/etc/kubernetes/ssl/kubernetes-key.pem \
--peer-cert-file=/etc/kubernetes/ssl/kubernetes.pem \
--peer-key-file=/etc/kubernetes/ssl/kubernetes-key.pem \
--trusted-ca-file=/etc/kubernetes/ssl/ca.pem \
--peer-trusted-ca-file=/etc/kubernetes/ssl/ca.pem \
--initial-advertise-peer-urls=https://172.23.210.30:2380 \
--listen-peer-urls=https://172.23.210.30:2380 \
--listen-client-urls=https://172.23.210.30:2379,http://127.0.0.1:2379 \
--advertise-client-urls=https://172.23.210.30:2379 \
--initial-cluster-token=etcd-cluster \
--initial-cluster=chenzg=https://172.23.210.30:2380 \
--initial-cluster-state=new \
--data-dir=/var/lib/etcd
Restart=on-failure
RestartSec=5
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
上一篇: Centos7安装
下一篇: REDIS优化、TTL、ETCD