bored-rain-98291
08/25/2022, 5:49 PMgray-lawyer-73831
08/25/2022, 5:52 PM#!/bin/bash
ETCD_VER=v3.5.4
# 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
Just update the etcd version at the top to whatever you want to use, and then copy etcdctl binary from tmp to a location in your PATHbored-rain-98291
08/25/2022, 5:54 PM