etcd v3.5.8 版本更新介绍
发布日期: 2023-04-13
版本号: v3.5.8
请查看etcd 3.5版本的完整变更日志,升级前务必阅读升级指南(可能存在破坏性变更)。安装指南可参考官方文档,最新支持的平台信息详见相关说明。Linux/macOS系统可通过下载预编译包(v3.5.8版本)进行安装:清除旧文件后,从Google或GitHub源下载对应架构的压缩包,解压至临时目录并验证组件版本。随后可通过临时目录启动本地etcd服务,并使用etcdctl进行读写操作。Docker用户可使用gcr.io或quay.io镜像,通过绑定数据目录和端口映射运行容器,执行etcd服务并验证功能。所有平台均需注意版本兼容性和操作指引中的注意事项。
更新内容 (中文)
详见原始内容
更新内容 (原始)
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.8
# 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
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.8
# 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.
rm -rf /tmp/etcd-data.tmp && mkdir -p /tmp/etcd-data.tmp && \
docker rmi gcr.io/etcd-development/etcd:v3.5.8 || true && \
docker run \
-p 2379:2379 \
-p 2380:2380 \
--mount type=bind,source=/tmp/etcd-data.tmp,destination=/etcd-data \
--name etcd-gcr-v3.5.8 \
gcr.io/etcd-development/etcd:v3.5.8 \
/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-v3.5.8 /usr/local/bin/etcd --version
docker exec etcd-gcr-v3.5.8 /usr/local/bin/etcdctl version
docker exec etcd-gcr-v3.5.8 /usr/local/bin/etcdutl version
docker exec etcd-gcr-v3.5.8 /usr/local/bin/etcdctl endpoint health
docker exec etcd-gcr-v3.5.8 /usr/local/bin/etcdctl put foo bar
docker exec etcd-gcr-v3.5.8 /usr/local/bin/etcdctl get foo