ETCD(二)配置文件说明

简介: ETCD(二)配置文件说明

从配置文件参数了解ETCD的一些特性

如下:

name: "etcdnode1" # 节点名称,需要自定义
data-dir: "/etcd-data/data" # 数据存储目录,可以看出etcd是用反斜杠类似文件目录的形式来分级并存储数据的
wal-dir: "/etcd-data/wal" # 预写式日志存储目录,这是设置WAL日志存储地址,不需要关注
listen-peer-urls: "http://0.0.0.0:12380" # 集群成员之间通讯使用的URL(集群服务节点与服务节点之间通讯)
listen-client-urls: "http://0.0.0.0:12379" # 集群提供给外部客户端访问的URL,即外部客户端必须通过指定的IP加端口访问etcd (客户端与服务节点之间通讯)
initial-advertise-peer-urls: "http://192.168.239.000:12380" #集群推荐配置地址
initial-cluster:"etcdnode0=http://192.168.239.000:2380,etcdnode1=http://192.168.239.000:12380,etcdnode2=http://192.168.239.000:22380" # 集群初始成员配置,是etcd静态部署的核心初始化配置,它说明了当前集群由哪些URLs组成,此处default为节点名称(以节点名称=节点地址拼接而成,通过这个参数可以找到集群所有节点)
initial-cluster-state: "new" # 初始化集群状态(new 或 existing)
initial-cluster-token: "etcd-cluster" # 引导期间etcd集群的初始集群令牌,防止不同集群之间产生交互,作为某一个集群的唯一名字标签
advertise-client-urls: "http://192.168.239.000:12379" # 向客户端发布的推荐服务端点
log-level: "warn" # 配置日志级别,仅支持 debug, info, warn, error, panic, or fatal

集群配置文件示例

etcd1: etcd --name ares1 --listen-client-urls http://localhost:12379 --advertise-client-urls http://localhost:12379 --listen-peer-urls http://localhost:12380 --initial-advertise-peer-urls http://localhost:12380 --initial-cluster-token etcd-cluster-1 --initial-cluster 'ares1=http://localhost:12380,ares2=http://localhost:22380,ares3=http://localhost:32380' --initial-cluster-state new
etcd2: etcd --name ares2 --listen-client-urls http://localhost:22379 --advertise-client-urls http://localhost:22379 --listen-peer-urls http://localhost:22380 --initial-advertise-peer-urls http://localhost:22380 --initial-cluster-token etcd-cluster-1 --initial-cluster 'ares1=http://localhost:12380,ares2=http://localhost:22380,ares3=http://localhost:32380' --initial-cluster-state new
etcd3: etcd --name ares3 --listen-client-urls http://localhost:32379 --advertise-client-urls http://localhost:32379 --listen-peer-urls http://localhost:32380 --initial-advertise-peer-urls http://localhost:32380 --initial-cluster-token etcd-cluster-1 --initial-cluster 'ares1=http://localhost:12380,ares2=http://localhost:22380,ares3=http://localhost:32380' --initial-cluster-state new
目录
相关文章
|
5月前
|
存储 关系型数据库 分布式数据库
【赵渝强老师】基于PostgreSQL的分布式数据库:Citus
Citus 是基于 PostgreSQL 的开源分布式数据库,采用 shared nothing 架构,具备良好的扩展性。它以插件形式集成,部署简单,适用于处理大规模数据和高并发场景。本文介绍了 Citus 的基础概念、安装配置步骤及其在单机环境下的集群搭建方法。
469 2
|
存储 Kubernetes Cloud Native
云原生|kubernetes|etcd集群详细介绍+安装部署+调优
云原生|kubernetes|etcd集群详细介绍+安装部署+调优
3199 1
|
Java 测试技术 Maven
Maven clean 提示文件 java.io.IOException
在使用Maven进行项目打包时,遇到了`Failed to delete`错误,尝试手动删除目标文件也失败,提示`java.io.IOException`。经过分析,发现问题是由于`sys-info.log`文件被其他进程占用。解决方法是关闭IDEA和相关Java进程,清理隐藏的Java进程后重新尝试Maven clean操作。最终问题得以解决。总结:遇到此类问题时,可以通过任务管理器清理相关进程或重启电脑来解决。
|
存储 消息中间件 JSON
DDD基础教程:一文带你读懂DDD分层架构
DDD基础教程:一文带你读懂DDD分层架构
|
Kubernetes 安全 Linux
在K8S中,calico和cilium这两种cni有什么区别?cailico的ipip模型和ciliume的vxlan模型,两种不通模型性能也不同,它们怎么处理数据的?
在K8S中,calico和cilium这两种cni有什么区别?cailico的ipip模型和ciliume的vxlan模型,两种不通模型性能也不同,它们怎么处理数据的?
|
SQL 安全 数据挖掘
Elasticsearch如何聚合查询多个统计值,如何嵌套聚合?并相互引用,统计索引中某一个字段的空值率?语法是怎么样的?
Elasticsearch聚合查询用于复杂数据分析,包括统计空值率。示例展示了如何计算字段`my_field`非空非零文档的百分比。查询分为三步:总文档数计数、符合条件文档数计数及计算百分比。聚合概念涵盖度量、桶和管道聚合。脚本在聚合中用于动态计算。常见聚合类型如`sum`、`avg`、`date_histogram`等。组合使用可实现多值统计、嵌套聚合和空值率计算。[阅读更多](https://zhangfeidezhu.com/?p=515)
521 0
Elasticsearch如何聚合查询多个统计值,如何嵌套聚合?并相互引用,统计索引中某一个字段的空值率?语法是怎么样的?
|
消息中间件 数据可视化 RocketMQ
RocketMQ一直连接master失败可能有以下几种原因:
RocketMQ一直连接master失败可能有以下几种原因:
411 2
|
Kubernetes 中间件 数据安全/隐私保护
traefik配置用户登录,限制K8S的web服务访问
像Elastic-APM, Traefik-Dashboard等页面,是没有用户登录限制的,如果我们希望给他们加上用户登录限制,我们需要在traeifk里给对应的ingress添加登录用的Middleware,那么该如何添加呢?本文以给K8S部署的traefik dashboard为例进行添加
964 0
traefik配置用户登录,限制K8S的web服务访问