<p>My ultimate goal is to run Kubernetes on a 3-node CoreOS cluster (if anyone has better suggestions, I'm all ears: at this stage, I'm considering CoreOS a complete waste of my time).</p>

<p>I've started following the <a href="https://coreos.com/blog/coreos-clustering-with-vagrant.html" rel="nofollow noreferrer">CoreOS guide to run a Vagrant cluster</a> (I even have the <a href="https://amzn.to/2pWIznU" rel="nofollow noreferrer">CoreOs in Action book</a> and that's not much help either) - I have obtained a fresh <code>discovery token</code> and modified the <code>user-data</code> and <code>config.rb</code> files as described there:</p>

<pre><code>#cloud-config

---
coreos:
  etcd2:
    discovery: https://discovery.etcd.io/7b9a3e994a14c2bf530ed88676e3fc97
</code></pre>

<p>and:</p>

<pre><code>$ cat config.rb
# Size of the CoreOS cluster created by Vagrant
$num_instances = 3
$update_channel = "stable"
</code></pre>

<p>the rest is all as in the original <code>coreos-vagrant</code> repository.</p>

<p>When first started, it appears that <code>etcd</code> is not started as a service; starting it up with <code>systemctl</code> seems to get it going, but it then does not discover its peers:</p>

<pre><code>core@core-01 ~ $ etcdctl member list
8e9e05c52164694d: name=4adff068c464446a8423e9b9f7c28711 peerURLs=http://localhost:2380 clientURLs=http://localhost:2379 isLeader=true
</code></pre>

<p>the same on all other three Vagrant VMs.</p>

<p>It seems to me that either the modified <code>user-data</code> is not picked up, or somehow the discovery token is ignored.</p>

<p>I have been googling around, but nothing seems to come up.</p>

<p>The main difficulty I'm finding is that virtually all the instructions around CoreOS/etcd point to these YAML files and then state one has to use <code>ct</code> to generate the "real" configuration: but they don't really show how to do this on a running VM, or how to change the running configuration.</p>

<p>A couple of questions:</p>

<p>1) what would be the "right way" to get the three VMs' <code>etcd</code> to start and finding each other?
Reading up <a href="https://coreos.com/etcd/docs/latest/platforms/container-linux-systemd.html" rel="nofollow noreferrer">the guide here</a> is really not that helpful.</p>

<p>The three VM are on a 'host-only' network:</p>

<pre><code>core@core-01 ~ $ ip address show
...
3: eth1: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:76:a6:cf brd ff:ff:ff:ff:ff:ff
    inet 172.17.8.101/16 brd 172.17.255.255 scope global eth1
</code></pre>

<p>(the other two are on <code>102</code> and <code>103</code>)</p>

<p>2) is there a "better" (for some definition of "better") way of getting a Kubernetes cluster running on 3 VirtualBox VMs?</p>

<p>It seems to me that CoreOS are trying to be too clever for their own good: I've been using various flavors of Linux for the past 10 years+ and getting the etcd cluster to find each other is proving frustratingly difficult.</p>

<p>I'm running Ubuntu 17.10 (well, all going well, it'll soon be 18.04 LTS) and Virtualbox 5.2.8.</p>

<p>Thanks in advance!</p>

<p>Unfortunately, the documentation you used is currently outdated. Right now <code>ETCD version 3</code> is used as a <code>Kubernetes</code> data storage. It provisions with <code>Ignition</code> (VirtualBox Provider (default)):</p>

<blockquote>
  <p>When using the VirtualBox provider for Vagrant (the default), Ignition
  is used to provision the machine.</p>
</blockquote>

<p><strong>1.</strong> Install <a href="https://github.com/coreos/vagrant-ignition" rel="noreferrer">vagrant-ignition</a> plugin (just in case if this plugin isn't automatically installed when using the default Vagrantfile from <code>coreos-vagrant</code> repo):</p>

<pre><code>git clone https://github.com/coreos/vagrant-ignition
cd vagrant-ignition
gem build vagrant-ignition.gemspec
vagrant plugin install vagrant-ignition-0.0.3.gem
</code></pre>

<p><strong>2.</strong> Install <a href="https://github.com/coreos/container-linux-config-transpiler" rel="noreferrer">ct</a>.</p>

<p><strong>3.</strong> Clone <a href="https://github.com/coreos/coreos-vagrant" rel="noreferrer">coreos-vagrant</a> repo:</p>

<pre><code>git clone https://github.com/coreos/coreos-vagrant
cd coreos-vagrant
</code></pre>

<p><strong>4.</strong> Create <code>config.rb</code> to start three CoreOS VMs:</p>

<pre><code>cp config.rb.sample config.rb
sed -i 's/$num_instances=1/$num_instances=3/g' config.rb
</code></pre>

<p><strong>5.</strong> Get etcd discovery token and put it into <code>cl.conf</code>:</p>

<pre><code>discovery_token=$(curl -s https://discovery.etcd.io/new\?size\=3)
sed -i "s|https://discovery.etcd.io/&lt;token&gt;|$discovery_token|g" cl.conf
</code></pre>

<p><strong>6.</strong> Use <a href="https://github.com/coreos/container-linux-config-transpiler" rel="noreferrer">config transpiler</a> to write the Ignition config to <code>config.ign</code>:</p>

<pre><code>ct --platform=vagrant-virtualbox &lt; cl.conf &gt; config.ign
</code></pre>

<p><strong>7.</strong> Create etcd cluster:</p>

<pre><code>vagrant up
</code></pre>

<p><code>ETCD</code> cluster is ready:</p>

<pre><code>core@core-01 ~ $ etcdctl member list
3655a3141d6f953b: name=core-01 peerURLs=http://172.17.8.101:2380 clientURLs=http://172.17.8.101:2379 isLeader=false
951a7a7a97c94116: name=core-02 peerURLs=http://172.17.8.102:2380 clientURLs=http://172.17.8.102:2379 isLeader=true
fd056871037fdb55: name=core-03 peerURLs=http://172.17.8.103:2380 clientURLs=http://172.17.8.103:2379 isLeader=false
</code></pre>
