關(guān)注點:
- 加密配置
- 壓縮配置
- 日志配置
- 監(jiān)控指標
- v2狀態(tài)
/etc/etcd/etcd.conf 相關(guān)參數(shù)含義 etcd -h自己查看
#[Member]
#ETCD_CORS=""
ETCD_DATA_DIR="/data/etcd/default.etcd"
#ETCD_WAL_DIR=""
ETCD_LISTEN_PEER_URLS="https://0.0.0.0:2380"
ETCD_LISTEN_CLIENT_URLS="https://0.0.0.0:2379"
#ETCD_MAX_SNAPSHOTS="5"
#ETCD_MAX_WALS="5"
ETCD_NAME="etcd01"
#ETCD_SNAPSHOT_COUNT="100000"
#ETCD_HEARTBEAT_INTERVAL="100" # 根據(jù)具體網(wǎng)絡情況調(diào)整涂滴,正常情況不用修改
#ETCD_ELECTION_TIMEOUT="1000" # 根據(jù)具體網(wǎng)絡情況調(diào)整叙凡,正常情況不用修改
#ETCD_QUOTA_BACKEND_BYTES="0" # 根據(jù)你們使用情況定義,默認2G,最大不建議超過8G
#ETCD_MAX_REQUEST_BYTES="1572864"
#ETCD_GRPC_KEEPALIVE_MIN_TIME="5s"
#ETCD_GRPC_KEEPALIVE_INTERVAL="2h0m0s"
#ETCD_GRPC_KEEPALIVE_TIMEOUT="20s"
#ETCD_SOCKET_REUSE_PORT="false"
#ETCD_SOCKET_REUSE_ADDRESS="false"
#
#[Clustering]
ETCD_INITIAL_ADVERTISE_PEER_URLS="https://ip1:2380"
ETCD_ADVERTISE_CLIENT_URLS="https://ip1:2379"
#ETCD_DISCOVERY=""
#ETCD_DISCOVERY_FALLBACK="proxy"
#ETCD_DISCOVERY_PROXY=""
#ETCD_DISCOVERY_SRV=""
ETCD_INITIAL_CLUSTER="etcd01=https://ip1:2380,etcd02=https://ip2:2380,etcd03=https://ip3:2380"
ETCD_INITIAL_CLUSTER_TOKEN="etcd-first"
ETCD_INITIAL_CLUSTER_STATE="new"
ETCD_STRICT_RECONFIG_CHECK="true"
ETCD_ENABLE_V2="false" # 根據(jù)使用情況定锌钮,3.6版本將廢棄告希,3.5和3.4默認是關(guān)閉的
ETCD_PRE_VOTE="true"
#
#[Compaction]
ETCD_AUTO_COMPACTION_MODE="periodic" # periodic:按照時間周期扑浸,revision: 按照版本
ETCD_AUTO_COMPACTION_RETENTION="72h" # 按需調(diào)整
#
#[Proxy]
#ETCD_PROXY="off"
#ETCD_PROXY_FAILURE_WAIT="5000"
#ETCD_PROXY_REFRESH_INTERVAL="30000"
#ETCD_PROXY_DIAL_TIMEOUT="1000"
#ETCD_PROXY_WRITE_TIMEOUT="5000"
#ETCD_PROXY_READ_TIMEOUT="0"
#
#[Security]
# 這塊主要用自簽名證書驗證,如果要更安全的防護燕偶,可以增加--**-cert-allowed-hostname喝噪、--peer-cert-allowed-cn、--cipher-suites指么、--host-whitelist等配置
ETCD_CERT_FILE="/path/etcd/ssl/server.pem"
ETCD_KEY_FILE="/path/etcd/ssl/server-key.pem"
ETCD_CLIENT_CERT_AUTH="true"
ETCD_TRUSTED_CA_FILE="/path/etcd/ssl/ca.pem"
#ETCD_AUTO_TLS="false"
ETCD_PEER_CERT_FILE="/path/etcd/etcdssl/server.pem"
ETCD_PEER_KEY_FILE="/path/etcd/etcdssl/server-key.pem"
ETCD_PEER_CLIENT_CERT_AUTH="true"
ETCD_PEER_TRUSTED_CA_FILE="/path/etcd/etcdssl/ca.pem"
#ETCD_PEER_AUTO_TLS="false"
#
#[Logging]
#ETCD_DEBUG="false"
ETCD_LOGGER="zap"
ETCD_LOG_LEVEL="info"
ETCD_ENABLE_LOG_ROTATION="true"
ETCD_LOG_OUTPUTS="/path/to/etcd.log"
#ETCT_LOG_ROTATION_CONFIG_JSON='{"maxsize": 100, "maxage": 0, "maxbackups": 0, "localtime": false, "compress": false}'
#
#[Unsafe]
#ETCD_FORCE_NEW_CLUSTER="false"
#
#[Version]
#ETCD_VERSION="false"
ETCD_AUTO_COMPACTION_RETENTION="5m"
ETCD_AUTO_COMPACTION_mode="periodic"
#
#[Profiling]
#ETCD_ENABLE_PPROF="false"
ETCD_METRICS="extensive"
#
#[Auth]
# 默認關(guān)閉酝惧,更具實際情況配置吧
#ETCD_AUTH_TOKEN="simple"