Etcd is a highly available distributed key value store that provides a reliable way to store data across a cluster of machines. Etcd gracefully handles master elections during network partitions and will tolerate machine failure, including the master.
Your applications can read and write data into etcd. A simple use-case is to store database connection details or feature flags in etcd as key value pairs. These values can be watched, allowing your app to reconfigure itself when they change.
Advanced uses take advantage of the consistency guarantees to implement database master elections or do distributed locking across a cluster of workers.
Etcd allows storing data in a distributed hierarchical database with observation.
We can deploy a single node easily with
juju deploy cs:~kubernetes/trusty/etcd
Add and capacity with:
juju add-unit -n 2 etcd
Its recommended to run an odd number of machines as it has greater redundancy than even number (ie. 4, you can lose 1 before quorum is lost, where as 5, you can 2).
Health of the cluster can be checked by verified via juju actions
juju action do etcd/0 health
<return response uuid>
juju action fetch <uuid>
The etcd charm was originally written by Kapil Thangavelu (@kapilt).
The kubernetes team maintains this charm:
- Whit Morriss <whit.morriss@canonical.com>
- Charles Butler <charles.butler@canonical.com>
- Matt Bruzek <matthew.bruzek@canonical.com>