CoreOS – Container Linux / 3 Node Linux Sample Configs – Node 1

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

CoreOS Ignition Configuration Files

In my configuration below I am using a Virtualbox VM, to see how to configure those VM’s you can read this..

Note:
The YAML files below are outdated and will only work with kubernetes v1.8.0.
For a copy of the most recent examples kubernetes version v.1.13.x+, is available on my GitHub repository by going here.
You can Also generate your own by using the generator also available on my GitHub repository by going here.

Note: An up-to-date example is available on my GitHub project page, or generate your own Kubernetes configuration with the Kubernetes generator available here on my GitHub page.

You can find at the end of this post the Node 1 ignition Container Linux Config.
To generate the final ignition/json file run the below.

You then use the n1-ign.ign file to configure / install CoreOS.
Boot the VM with the CoreOS ISO, then copy the ign file to the VM and run the below to install the OS to disk with ign config.

General Notes:
Make sure to replace the certificates with your generated certificates,
Replace the ssh-keys with your keys.
Replace the users password with yours.
Replace or remove the proxy with yours.

Notes on the below configuration

  1. If you are re-joining an existing etcd cluster node (i.e. you are re-using the node name/ip), follow the below process to first remove the node from ethcd, then re-add the node.
  2. The ct utility generates an ignition config which also adds to the etcd-member service a Unit with a dependency on coreos-metadata.service.

    The issue is on a bear-metal install the coreos-metadata.service wont start causing etcd-member service to wait for the dependency.

    To get around this issue, remove the Unit and the 2 top lines from the etcd-member.service.d/20-clct-etcd-member.conf. like the below.

    Remove the 3 top lines.
  3. Make sure to disable the coreos-metadata.service with systemcctl disable coreos-metadata.service (if its enabled)
  4. (Optional) Copy the kubectl to /opt, by running the below.
  5. Lastly, Enable the kubelet service with systemctl enable kubelet. then reboot now everything should come up clean.

Note: If you know a workaround how to disable the coreos-metadata.service dependency being added to the etcd-member service, I would appreciate if you let me know in the comments below.

To re-join an existing Etcd Memeber
First get the member name list, by running the below.

Next, remove the memebr, in the below example its coreos3

Now, re-add the member to the cluster.

At the next coreos3 Etcd startup it will re-join the cluster cleanly.
Note: Make sure to change the etcd-member config from “new” to “existing” (i.e. –initial-cluster-state=”existing”).

Node 1 full ignition config

Back to Kubernetes Configuration

You might also like – Other articles related to Docker Kubernetes / micro-service.

Like what you’re reading? please provide feedback, any feedback is appreciated.

Leave a Reply

avatar
  Subscribe  
Notify of