Skip to Content
Kubernetes Cookbook - Second Edition
book

Kubernetes Cookbook - Second Edition

by Hideto Saito, Hui-Chuan Chloe Lee, Ke-Jou Carol Hsu
May 2018
Intermediate to advanced
554 pages
13h 51m
English
Packt Publishing
Content preview from Kubernetes Cookbook - Second Edition

kubespray

On the other hand, if you're using kubespray to provision your servers, kubespray supports multi-node etcd natively. What you need to do is add multiple nodes in the etcd section in the configuration file (inventory.cfg):

# cat inventory/inventory.cfgmy-master-1 ansible_ssh_host=<master_ip>my-node-1 ansible_ssh_host=<node_ip>my-etcd-1 ansible_ssh_host=<etcd1_ip>my-etcd-2 ansible_ssh_host=<etcd2_ip>my-etcd-3 ansible_ssh_host=<etcd3_ip>[kube-master]my-master-1[etcd]my-etcd-1my-etcd-2my-etcd-3[kube-node]my-master-1my-node-1

Then you are good to provision a cluster with three-node etcd:

// provision a cluster $ ansible-playbook -b -i inventory/inventory.cfg cluster.yml

After the ansible playbook is launched, it will configure the role, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kubernetes Cookbook

Kubernetes Cookbook

Sébastien Goasguen, Michael Hausenblas
DevOps with Kubernetes - Second Edition

DevOps with Kubernetes - Second Edition

Hideto Saito, Hui-Chuan Chloe Lee, Cheng-Yang Wu

Publisher Resources

ISBN: 9781788837606Supplemental Content