Discovery  mechanism

Discovery provides a more flexible way to create a cluster. It doesn't need to know other peer IPs beforehand. It uses an existing etcd cluster to bootstrap one. In this section, we'll demonstrate how to leverage that to launch a three-node etcd cluster:

  1. Firstly, we'll need to have an existing cluster with three-node configuration. Luckily, the etcd official website provides a discovery service (https://discovery.etcd.io/new?size=n); n will be the number of nodes in your etcd cluster, which is ready to use:
// get a request URL# curl -w "n" 'https://discovery.etcd.io/new?size=3'https://discovery.etcd.io/f6a3fb54b3fd1bb02e26a89fd40df0e8
  1. Then we are able to use the URL to bootstrap a cluster easily. The command line ...

Get Kubernetes Cookbook, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.