Etcd for SUSE

Right now, there is no distro package available for etcd3. This guide uses the tarball installation as a workaround until proper distro packages are available.

The etcd service runs on the controller node.

Bileşenleri kur ve yapılandır

  1. Install etcd:

    • Create etcd user:

      # groupadd --system etcd
      # useradd --home-dir "/var/lib/etcd" \
            --system \
            --shell /bin/false \
            -g etcd \
    • Create the necessary directories:

      # mkdir -p /etc/etcd
      # chown etcd:etcd /etc/etcd
      # mkdir -p /var/lib/etcd
      # chown etcd:etcd /var/lib/etcd
    • Determine your system architecture:

      # uname -m
    • Download and install the etcd tarball for x86_64/amd64:

      # ETCD_VER=v3.2.7
      # rm -rf /tmp/etcd && mkdir -p /tmp/etcd
      # curl -L \
  ${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 --strip-components=1
      # cp /tmp/etcd/etcd /usr/bin/etcd
      # cp /tmp/etcd/etcdctl /usr/bin/etcdctl

      Or download and install the etcd tarball for arm64:

      # ETCD_VER=v3.2.7
      # rm -rf /tmp/etcd && mkdir -p /tmp/etcd
      # curl -L \
  ${ETCD_VER}/etcd-${ETCD_VER}-linux-arm64.tar.gz \
            -o /tmp/etcd-${ETCD_VER}-linux-arm64.tar.gz
      # tar xzvf /tmp/etcd-${ETCD_VER}-linux-arm64.tar.gz \
            -C /tmp/etcd --strip-components=1
      # cp /tmp/etcd/etcd /usr/bin/etcd
      # cp /tmp/etcd/etcdctl /usr/bin/etcdctl
  1. Create and edit the /etc/etcd/etcd.conf.yml file and set the initial-cluster, initial-advertise-peer-urls, advertise-client-urls, listen-client-urls to the management IP address of the controller node to enable access by other nodes via the management network:

    name: controller
    data-dir: /var/lib/etcd
    initial-cluster-state: 'new'
    initial-cluster-token: 'etcd-cluster-01'
    initial-cluster: controller=
  2. Create and edit the /usr/lib/systemd/system/etcd.service file:

    Description=etcd - highly-available key value store
    # Uncomment this on ARM64.
    # Environment="ETCD_UNSUPPORTED_ARCH=arm64"
    ExecStart=/usr/bin/etcd --config-file /etc/etcd/etcd.conf.yml

    Reload systemd service files with:

    # systemctl daemon-reload

Kurulumu bitir

  1. Enable and start the etcd service:

    # systemctl enable etcd
    # systemctl start etcd