etcd

etcd-ioApache-2.0活跃维护

基于 Raft 共识算法的分布式键值存储,为 Kubernetes 等系统保存配置、服务发现和选主等最关键的数据。

Distributed reliable key-value store for the most critical data of a distributed system

v3.7.3发布于 2026-10-22 23:12 UTC52,685star +37 / 7 天10,596fork同步于 2026-11-10 11:19 UTC

怎么上手

由 README 提炼,执行前请确认
/tmp/etcd-download-test/etcd
etcdctl put mykey "this is awesome"
硬件要求按 README 说明

README 未说明硬件要求;提供 OSX、Linux、Windows 和 Docker 的预编译二进制,用 Go 编写,未提及 GPU 或显存。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

分布式可靠键值存储,用 Raft 为分布式系统保存最关键的数据

基于 Raft 共识算法的分布式键值存储,为 Kubernetes 等系统保存配置、服务发现和选主等最关键的数据。

核心能力

  • 用 Raft 共识算法维护高可用复制日志
  • 提供定义清晰的 gRPC 用户 API
  • 支持自动 TLS 与可选客户端证书认证
  • 自带 etcdctl 命令行客户端读写键值
  • 官方基准测试达每秒 1 万次写入

容易踩的坑

main 分支开发中可能不稳定甚至不可用,稳定版请用 releases 页面;默认监听 2379 客户端端口和 2380 节点间通信端口,注意端口占用;本地多节点集群需先安装 goreman 并用 Procfile 启动。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v3.7.3
  1. v3.7.3最新正式版2026-10-22 · 2026-10-22 23:12 UTC

    Please check out CHANGELOG for a full list of changes. And make sure to read upgrade guide before upgrading etcd (there may be breaking changes).

    For installation guides, please check out play.etcd.io and operating etcd. Latest support status for common architectures and operating systems can be found at supported platforms.

    Linux
    ETCD_VER=v3.7.3
    
    # choose either URL
    GOOGLE_URL=https://storage.googleapis.com/etcd
    GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
    DOWNLOAD_URL=${GOOGLE_URL}
    
    rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    rm -rf /tmp/etcd-download-test && mkdir -p /tmp/etcd-download-test
    
    curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/etcd-download-test --strip-components=1 --no-same-owner
    rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    
    /tmp/etcd-download-test/etcd --version
    /tmp/etcd-download-test/etcdctl version
    /tmp/etcd-download-test/etcdutl version
    
    # start a local etcd server
    /tmp/etcd-download-test/etcd
    
    # write,read to etcd
    /tmp/etcd-download-test/etcdctl --endpoints=localhost:2379 put foo bar
    /tmp/etcd-download-test/etcdctl --endpoints=localhost:2379 get foo
    
    macOS (Darwin)
    ETCD_VER=v3.7.3
    
    # choose either URL
    GOOGLE_URL=https://storage.googleapis.com/etcd
    GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
    DOWNLOAD_URL=${GOOGLE_URL}
    
    rm -f /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    rm -rf /tmp/etcd-download-test && mkdir -p /tmp/etcd-download-test
    
    curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-darwin-amd64.zip -o /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    unzip /tmp/etcd-${ETCD_VER}-darwin-amd64.zip -d /tmp && rm -f /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    mv /tmp/etcd-${ETCD_VER}-darwin-amd64/* /tmp/etcd-download-test && rm -rf mv /tmp/etcd-${ETCD_VER}-darwin-amd64
    
    /tmp/etcd-download-test/etcd --version
    /tmp/etcd-download-test/etcdctl version
    /tmp/etcd-download-test/etcdutl version
    
    Docker

    etcd uses gcr.io/etcd-development/etcd as a primary container registry, and quay.io/coreos/etcd as secondary.

    ETCD_VER=v3.7.3
    
    rm -rf /tmp/etcd-data.tmp && mkdir -p /tmp/etcd-data.tmp && \
      docker rmi gcr.io/etcd-development/etcd:${ETCD_VER} || true && \
      docker run \
      -p 2379:2379 \
      -p 2380:2380 \
      --mount type=bind,source=/tmp/etcd-data.tmp,destination=/etcd-data \
      --name etcd-gcr-${ETCD_VER} \
      gcr.io/etcd-development/etcd:${ETCD_VER} \
      /usr/local/bin/etcd \
      --name s1 \
      --data-dir /etcd-data \
      --listen-client-urls http://0.0.0.0:2379 \
      --advertise-client-urls http://0.0.0.0:2379 \
      --listen-peer-urls http://0.0.0.0:2380 \
      --initial-advertise-peer-urls http://0.0.0.0:2380 \
      --initial-cluster s1=http://0.0.0.0:2380 \
      --initial-cluster-token tkn \
      --initial-cluster-state new \
      --log-level info \
      --logger zap \
      --log-outputs stderr
    
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcd --version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdutl version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl endpoint health
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl put foo bar
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl get foo
    
  2. v3.6.162026-10-22 · 2026-10-22 23:00 UTC
    查看更新说明

    Please check out CHANGELOG for a full list of changes. And make sure to read upgrade guide before upgrading etcd (there may be breaking changes).

    For installation guides, please check out play.etcd.io and operating etcd. Latest support status for common architectures and operating systems can be found at supported platforms.

    Linux
    ETCD_VER=v3.6.16
    
    # choose either URL
    GOOGLE_URL=https://storage.googleapis.com/etcd
    GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
    DOWNLOAD_URL=${GOOGLE_URL}
    
    rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    rm -rf /tmp/etcd-download-test && mkdir -p /tmp/etcd-download-test
    
    curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/etcd-download-test --strip-components=1 --no-same-owner
    rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    
    /tmp/etcd-download-test/etcd --version
    /tmp/etcd-download-test/etcdctl version
    /tmp/etcd-download-test/etcdutl version
    
    # start a local etcd server
    /tmp/etcd-download-test/etcd
    
    # write,read to etcd
    /tmp/etcd-download-test/etcdctl --endpoints=localhost:2379 put foo bar
    /tmp/etcd-download-test/etcdctl --endpoints=localhost:2379 get foo
    
    macOS (Darwin)
    ETCD_VER=v3.6.16
    
    # choose either URL
    GOOGLE_URL=https://storage.googleapis.com/etcd
    GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
    DOWNLOAD_URL=${GOOGLE_URL}
    
    rm -f /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    rm -rf /tmp/etcd-download-test && mkdir -p /tmp/etcd-download-test
    
    curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-darwin-amd64.zip -o /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    unzip /tmp/etcd-${ETCD_VER}-darwin-amd64.zip -d /tmp && rm -f /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    mv /tmp/etcd-${ETCD_VER}-darwin-amd64/* /tmp/etcd-download-test && rm -rf mv /tmp/etcd-${ETCD_VER}-darwin-amd64
    
    /tmp/etcd-download-test/etcd --version
    /tmp/etcd-download-test/etcdctl version
    /tmp/etcd-download-test/etcdutl version
    
    Docker

    etcd uses gcr.io/etcd-development/etcd as a primary container registry, and quay.io/coreos/etcd as secondary.

    ETCD_VER=v3.6.16
    
    rm -rf /tmp/etcd-data.tmp && mkdir -p /tmp/etcd-data.tmp && \
      docker rmi gcr.io/etcd-development/etcd:${ETCD_VER} || true && \
      docker run \
      -p 2379:2379 \
      -p 2380:2380 \
      --mount type=bind,source=/tmp/etcd-data.tmp,destination=/etcd-data \
      --name etcd-gcr-${ETCD_VER} \
      gcr.io/etcd-development/etcd:${ETCD_VER} \
      /usr/local/bin/etcd \
      --name s1 \
      --data-dir /etcd-data \
      --listen-client-urls http://0.0.0.0:2379 \
      --advertise-client-urls http://0.0.0.0:2379 \
      --listen-peer-urls http://0.0.0.0:2380 \
      --initial-advertise-peer-urls http://0.0.0.0:2380 \
      --initial-cluster s1=http://0.0.0.0:2380 \
      --initial-cluster-token tkn \
      --initial-cluster-state new \
      --log-level info \
      --logger zap \
      --log-outputs stderr
    
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcd --version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdutl version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl endpoint health
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl put foo bar
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl get foo
    
  3. v3.5.352026-10-22 · 2026-10-22 21:36 UTC
    查看更新说明

    Please check out CHANGELOG for a full list of changes. And make sure to read upgrade guide before upgrading etcd (there may be breaking changes).

    For installation guides, please check out play.etcd.io and operating etcd. Latest support status for common architectures and operating systems can be found at supported platforms.

    Linux
    ETCD_VER=v3.5.35
    
    # choose either URL
    GOOGLE_URL=https://storage.googleapis.com/etcd
    GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
    DOWNLOAD_URL=${GOOGLE_URL}
    
    rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    rm -rf /tmp/etcd-download-test && mkdir -p /tmp/etcd-download-test
    
    curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/etcd-download-test --strip-components=1 --no-same-owner
    rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    
    /tmp/etcd-download-test/etcd --version
    /tmp/etcd-download-test/etcdctl version
    /tmp/etcd-download-test/etcdutl version
    
    # start a local etcd server
    /tmp/etcd-download-test/etcd
    
    # write,read to etcd
    /tmp/etcd-download-test/etcdctl --endpoints=localhost:2379 put foo bar
    /tmp/etcd-download-test/etcdctl --endpoints=localhost:2379 get foo
    
    macOS (Darwin)
    ETCD_VER=v3.5.35
    
    # choose either URL
    GOOGLE_URL=https://storage.googleapis.com/etcd
    GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
    DOWNLOAD_URL=${GOOGLE_URL}
    
    rm -f /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    rm -rf /tmp/etcd-download-test && mkdir -p /tmp/etcd-download-test
    
    curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-darwin-amd64.zip -o /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    unzip /tmp/etcd-${ETCD_VER}-darwin-amd64.zip -d /tmp && rm -f /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    mv /tmp/etcd-${ETCD_VER}-darwin-amd64/* /tmp/etcd-download-test && rm -rf mv /tmp/etcd-${ETCD_VER}-darwin-amd64
    
    /tmp/etcd-download-test/etcd --version
    /tmp/etcd-download-test/etcdctl version
    /tmp/etcd-download-test/etcdutl version
    
    Docker

    etcd uses gcr.io/etcd-development/etcd as a primary container registry, and quay.io/coreos/etcd as secondary.

    ETCD_VER=v3.5.35
    
    rm -rf /tmp/etcd-data.tmp && mkdir -p /tmp/etcd-data.tmp && \
      docker rmi gcr.io/etcd-development/etcd:${ETCD_VER} || true && \
      docker run \
      -p 2379:2379 \
      -p 2380:2380 \
      --mount type=bind,source=/tmp/etcd-data.tmp,destination=/etcd-data \
      --name etcd-gcr-${ETCD_VER} \
      gcr.io/etcd-development/etcd:${ETCD_VER} \
      /usr/local/bin/etcd \
      --name s1 \
      --data-dir /etcd-data \
      --listen-client-urls http://0.0.0.0:2379 \
      --advertise-client-urls http://0.0.0.0:2379 \
      --listen-peer-urls http://0.0.0.0:2380 \
      --initial-advertise-peer-urls http://0.0.0.0:2380 \
      --initial-cluster s1=http://0.0.0.0:2380 \
      --initial-cluster-token tkn \
      --initial-cluster-state new \
      --log-level info \
      --logger zap \
      --log-outputs stderr
    
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcd --version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdutl version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl endpoint health
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl put foo bar
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl get foo
    
  4. v3.7.22026-09-22 · 2026-09-22 21:22 UTC
    查看更新说明

    Please check out CHANGELOG for a full list of changes. And make sure to read upgrade guide before upgrading etcd (there may be breaking changes).

    For installation guides, please check out play.etcd.io and operating etcd. Latest support status for common architectures and operating systems can be found at supported platforms.

    Linux
    ETCD_VER=v3.7.2
    
    # choose either URL
    GOOGLE_URL=https://storage.googleapis.com/etcd
    GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
    DOWNLOAD_URL=${GOOGLE_URL}
    
    rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    rm -rf /tmp/etcd-download-test && mkdir -p /tmp/etcd-download-test
    
    curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/etcd-download-test --strip-components=1 --no-same-owner
    rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    
    /tmp/etcd-download-test/etcd --version
    /tmp/etcd-download-test/etcdctl version
    /tmp/etcd-download-test/etcdutl version
    
    # start a local etcd server
    /tmp/etcd-download-test/etcd
    
    # write,read to etcd
    /tmp/etcd-download-test/etcdctl --endpoints=localhost:2379 put foo bar
    /tmp/etcd-download-test/etcdctl --endpoints=localhost:2379 get foo
    
    macOS (Darwin)
    ETCD_VER=v3.7.2
    
    # choose either URL
    GOOGLE_URL=https://storage.googleapis.com/etcd
    GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
    DOWNLOAD_URL=${GOOGLE_URL}
    
    rm -f /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    rm -rf /tmp/etcd-download-test && mkdir -p /tmp/etcd-download-test
    
    curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-darwin-amd64.zip -o /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    unzip /tmp/etcd-${ETCD_VER}-darwin-amd64.zip -d /tmp && rm -f /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    mv /tmp/etcd-${ETCD_VER}-darwin-amd64/* /tmp/etcd-download-test && rm -rf mv /tmp/etcd-${ETCD_VER}-darwin-amd64
    
    /tmp/etcd-download-test/etcd --version
    /tmp/etcd-download-test/etcdctl version
    /tmp/etcd-download-test/etcdutl version
    
    Docker

    etcd uses gcr.io/etcd-development/etcd as a primary container registry, and quay.io/coreos/etcd as secondary.

    ETCD_VER=v3.7.2
    
    rm -rf /tmp/etcd-data.tmp && mkdir -p /tmp/etcd-data.tmp && \
      docker rmi gcr.io/etcd-development/etcd:${ETCD_VER} || true && \
      docker run \
      -p 2379:2379 \
      -p 2380:2380 \
      --mount type=bind,source=/tmp/etcd-data.tmp,destination=/etcd-data \
      --name etcd-gcr-${ETCD_VER} \
      gcr.io/etcd-development/etcd:${ETCD_VER} \
      /usr/local/bin/etcd \
      --name s1 \
      --data-dir /etcd-data \
      --listen-client-urls http://0.0.0.0:2379 \
      --advertise-client-urls http://0.0.0.0:2379 \
      --listen-peer-urls http://0.0.0.0:2380 \
      --initial-advertise-peer-urls http://0.0.0.0:2380 \
      --initial-cluster s1=http://0.0.0.0:2380 \
      --initial-cluster-token tkn \
      --initial-cluster-state new \
      --log-level info \
      --logger zap \
      --log-outputs stderr
    
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcd --version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdutl version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl endpoint health
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl put foo bar
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl get foo
    
  5. v3.6.152026-09-22 · 2026-09-22 21:06 UTC
    查看更新说明

    Please check out CHANGELOG for a full list of changes. And make sure to read upgrade guide before upgrading etcd (there may be breaking changes).

    For installation guides, please check out play.etcd.io and operating etcd. Latest support status for common architectures and operating systems can be found at supported platforms.

    Linux
    ETCD_VER=v3.6.15
    
    # choose either URL
    GOOGLE_URL=https://storage.googleapis.com/etcd
    GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
    DOWNLOAD_URL=${GOOGLE_URL}
    
    rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    rm -rf /tmp/etcd-download-test && mkdir -p /tmp/etcd-download-test
    
    curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/etcd-download-test --strip-components=1 --no-same-owner
    rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
    
    /tmp/etcd-download-test/etcd --version
    /tmp/etcd-download-test/etcdctl version
    /tmp/etcd-download-test/etcdutl version
    
    # start a local etcd server
    /tmp/etcd-download-test/etcd
    
    # write,read to etcd
    /tmp/etcd-download-test/etcdctl --endpoints=localhost:2379 put foo bar
    /tmp/etcd-download-test/etcdctl --endpoints=localhost:2379 get foo
    
    macOS (Darwin)
    ETCD_VER=v3.6.15
    
    # choose either URL
    GOOGLE_URL=https://storage.googleapis.com/etcd
    GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
    DOWNLOAD_URL=${GOOGLE_URL}
    
    rm -f /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    rm -rf /tmp/etcd-download-test && mkdir -p /tmp/etcd-download-test
    
    curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-darwin-amd64.zip -o /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    unzip /tmp/etcd-${ETCD_VER}-darwin-amd64.zip -d /tmp && rm -f /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
    mv /tmp/etcd-${ETCD_VER}-darwin-amd64/* /tmp/etcd-download-test && rm -rf mv /tmp/etcd-${ETCD_VER}-darwin-amd64
    
    /tmp/etcd-download-test/etcd --version
    /tmp/etcd-download-test/etcdctl version
    /tmp/etcd-download-test/etcdutl version
    
    Docker

    etcd uses gcr.io/etcd-development/etcd as a primary container registry, and quay.io/coreos/etcd as secondary.

    ETCD_VER=v3.6.15
    
    rm -rf /tmp/etcd-data.tmp && mkdir -p /tmp/etcd-data.tmp && \
      docker rmi gcr.io/etcd-development/etcd:${ETCD_VER} || true && \
      docker run \
      -p 2379:2379 \
      -p 2380:2380 \
      --mount type=bind,source=/tmp/etcd-data.tmp,destination=/etcd-data \
      --name etcd-gcr-${ETCD_VER} \
      gcr.io/etcd-development/etcd:${ETCD_VER} \
      /usr/local/bin/etcd \
      --name s1 \
      --data-dir /etcd-data \
      --listen-client-urls http://0.0.0.0:2379 \
      --advertise-client-urls http://0.0.0.0:2379 \
      --listen-peer-urls http://0.0.0.0:2380 \
      --initial-advertise-peer-urls http://0.0.0.0:2380 \
      --initial-cluster s1=http://0.0.0.0:2380 \
      --initial-cluster-token tkn \
      --initial-cluster-state new \
      --log-level info \
      --logger zap \
      --log-outputs stderr
    
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcd --version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdutl version
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl endpoint health
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl put foo bar
    docker exec etcd-gcr-${ETCD_VER} /usr/local/bin/etcdctl get foo
    

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    etcd

    Go Report Card Coverage Tests codeql-analysis Docs Godoc Releases LICENSE OpenSSF Scorecard

    Note: The main branch may be in an unstable or even broken state during development. For stable versions, see releases.

    etcd is a distributed reliable key-value store for the most critical data of a distributed system, with a focus on being:

    • Simple: well-defined, user-facing API (gRPC)
    • Secure: automatic TLS with optional client cert authentication
    • Fast: benchmarked 10,000 writes/sec
    • Reliable: properly distributed using Raft

    etcd is written in Go and uses the Raft consensus algorithm to manage a highly-available replicated log.

    etcd is used in production by many companies, and the development team stands behind it in critical deployment scenarios, where etcd is frequently teamed with applications such as Kubernetes, locksmith, vulcand, Doorman, and many others. Reliability is further ensured by rigorous robustness testing.

    See etcdctl for a simple command line client.

    etcd reliability is important

    Original image credited to xkcd.com/2347, alterations by Josh Berkus.

    Documentation

    The most common API documentation you'll need can be found here:

    Maintainers

    Maintainers strive to shape an inclusive open source project culture where users are heard and contributors feel respected and empowered. Maintainers aim to build productive relationships across different companies and disciplines. Read more about Maintainers role and responsibilities.

    Getting started

    Getting etcd

    The easiest way to get etcd is to use one of the pre-built release binaries which are available for OSX, Linux, Windows, and Docker on the release page.

    For more installation guides, please check out operating etcd.

    Running etcd

    First start a single-member cluster of etcd.

    If etcd is installed using the pre-built release binaries, run it from the installation location as below:

    /tmp/etcd-download-test/etcd
    

    The etcd command can be simply run as such if it is moved to the system path as below:

    mv /tmp/etcd-download-test/etcd /usr/local/bin/
    etcd
    

    This will bring up etcd listening on port 2379 for client communication and on port 2380 for server-to-server communication.

    Next, let's set a single key, and then retrieve it:

    etcdctl put mykey "this is awesome"
    etcdctl get mykey
    

    etcd is now running and serving client requests. For more, please check out:

    etcd TCP ports

    The official etcd ports are 2379 for client requests, and 2380 for peer communication.

    Running a local etcd cluster

    First install goreman, which manages Procfile-based applications.

    Our Procfile script will set up a local example cluster. Start it with:

    goreman start
    

    This will bring up 3 etcd members infra1, infra2 and infra3 and optionally etcd grpc-proxy, which runs locally and composes a cluster.

    Every cluster member and proxy accepts key value reads and key value writes.

    Follow the comments in Procfile script to add a learner node to the cluster.

    Install etcd client v3

    go get go.etcd.io/etcd/client/v3
    

    Next steps

    Now it's time to dig into the full etcd API and other guides.

    Contact

    Community meetings

    etcd contributors and maintainers meet every week at 11:00 AM (USA Pacific) on Thursday and meetings alternate between community meetings and issue triage meetings. Meeting agendas are recorded in a shared Google doc and everyone is welcome to suggest additional topics or other agendas.

    Issue triage meetings are aimed at getting through our backlog of PRs and Issues. Triage meetings are open to any contributor; you don't have to be a reviewer or approver to help out! They can also be a good way to get started contributing.

    The meeting lead role is rotated for each meeting between etcd maintainers or sig-etcd leads and is recorded in a shared Google sheet.

    Meeting recordings are uploaded to the official etcd YouTube channel.

    Get calendar invitations by joining etcd-dev mailing group.

    Join the CNCF-funded Zoom channel: zoom.us/my/cncfetcdproject

    Contributing

    See CONTRIBUTING for details on setting up your development environment, submitting patches and the contribution workflow.

    Please refer to community-membership.md for information on becoming an etcd project member. We welcome and look forward to your contributions to the project!

    Please also refer to roadmap to get more details on the priorities for the next few major or minor releases.

    Reporting bugs

    See reporting bugs for details about reporting any issues. Before opening an issue please check it is not covered in our frequently asked questions.

    Reporting a security vulnerability

    See security disclosure and release process for details on how to report a security vulnerability and how the etcd team manages it.

    Issue and PR management

    See issue triage guidelines for details on how issues are managed.

    See PR management for guidelines on how pull requests are managed.

    etcd Emeritus Maintainers

    etcd emeritus maintainers dedicated a part of their career to etcd and reviewed code, triaged bugs and pushed the project forward over a substantial period of time. Their contribution is greatly appreciated.

    License

    etcd is under the Apache 2.0 license. See the LICENSE file for details.