Skip to content

Add missing etcd member-update subcommand to k0s #6582

@Danil-Grigorev

Description

@Danil-Grigorev

Is your feature request related to a problem? Please describe.

During investigation on issue with performing a HA cluster DR using k0sctl, I've faced the need to update etcd member peerURL to allow joining CP nodes to the first replica without issues. Default etcd member peerURL was incorrect, and pointed to a node from the old etcd cluster.

This is possible to do using etcdctl, yet it requires to have external dependency.

Describe the solution you would like

Add k0s etcd member-update subcommand, allowing to change any member peerURL on any architecture without bringing external dependencies, such as etcdctl tool.

Describe alternatives you've considered

Using etcdctl tool directly works as well, yet it was needed to install it on the node first. It seems to impractical, since k0s etcd subcommand already allows member to leave or be listed.

ETCDCTL_API=3 etcdctl \
  --endpoints=https://127.0.0.1:2379 \
  --cert=/var/lib/k0s/pki/etcd/server.crt \
  --key=/var/lib/k0s/pki/etcd/server.key \
  --cacert=/var/lib/k0s/pki/etcd/ca.crt \
  member update <meber-id> --peer-urls=https://<nodePrivateIP>:2380

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions