Etcd Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
(Replaced content with "=Internal= * etcd =Commands= * etcdctl")
 
(6 intermediate revisions by the same user not shown)
Line 3: Line 3:
* [[etcd#Subjects|etcd]]
* [[etcd#Subjects|etcd]]


=Cluster Health=
=Commands=


From the node that runs etcd, as root:
* [[etcdctl]]
 
<pre>
etcdctl -C https://master1.rdu20.internal:2379,https://master2.rdu20.internal:2379,https://master3.rdu20.internal:2379 \
  --ca-file /etc/origin/master/master.etcd-ca.crt \
  --cert-file /etc/origin/master/master.etcd-client.crt \
  --key-file /etc/origin/master/master.etcd-client.key \
  cluster-health
</pre>
 
Output sample:
 
<pre>
member 1a40b73f9ca5a801 is healthy: got healthy result from https://192.199.0.199:2379
member 29624cdcf8f6ff04 is healthy: got healthy result from https://192.199.0.25:2379
member 70911c36dca72e7c is healthy: got healthy result from https://192.199.0.52:2379
</pre>
 
=Member List=
 
<pre>
etcdctl -C https://master1.rdu20.internal:2379,https://master2.rdu20.internal:2379,https://master3.rdu20.internal:2379 \
  --ca-file /etc/origin/master/master.etcd-ca.crt \
  --cert-file /etc/origin/master/master.etcd-client.crt \
  --key-file /etc/origin/master/master.etcd-client.key \
  member list
</pre>
 
Output sample:
 
<pre>
1a40b73f9ca5a801: name=master1.rdu20.internal peerURLs=https://192.199.0.199:2380 clientURLs=https://192.199.0.199:2379 isLeader=false
29624cdcf8f6ff04: name=master3.rdu20.internal peerURLs=https://192.199.0.25:2380 clientURLs=https://192.199.0.25:2379 isLeader=false
70911c36dca72e7c: name=master2.rdu20.internal peerURLs=https://192.199.0.52:2380 clientURLs=https://192.199.0.52:2379 isLeader=true
</pre>

Latest revision as of 23:49, 4 July 2017

Internal

Commands