Etcd Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 36: Line 36:


<pre>
<pre>
1a40b73f9ca5a801: name=master1.rdu20.internal peerURLs=https://192.199.0.199:2380 clientURLs=https://192.199.0.199:2379 isLeader=false
6f4cee0c78fff8fd: name=master1.openshift35.local peerURLs=https://172.23.0.4:2380 clientURLs=https://172.23.0.4:2379 isLeader=true
29624cdcf8f6ff04: name=master3.rdu20.internal peerURLs=https://192.199.0.25:2380 clientURLs=https://192.199.0.25:2379 isLeader=false
a423b0b54377c79f: name=master3.openshift35.local peerURLs=https://172.23.0.6:2380 clientURLs=https://172.23.0.6:2379 isLeader=false
70911c36dca72e7c: name=master2.rdu20.internal peerURLs=https://192.199.0.52:2380 clientURLs=https://192.199.0.52:2379 isLeader=true
b5a071be696c6070: name=master2.openshift35.local peerURLs=https://172.23.0.5:2380 clientURLs=https://172.23.0.5:2379 isLeader=false
</pre>
</pre>

Revision as of 22:15, 25 May 2017

Internal

Cluster Health

From the node that runs etcd, as root:

etcdctl -C https://master1.openshift35.local:2379,https://master2.openshift35.local:2379,https://master3.openshift35.local: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

Output sample:

member 6f4cee0c78fff8fd is healthy: got healthy result from https://172.23.0.4:2379
member a423b0b54377c79f is healthy: got healthy result from https://172.23.0.6:2379
member b5a071be696c6070 is healthy: got healthy result from https://172.23.0.5:2379

Member List

etcdctl -C https://master1.openshift35.local:2379,https://master2.openshift35.local:2379,https://master3.openshift35.local: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

Output sample:

6f4cee0c78fff8fd: name=master1.openshift35.local peerURLs=https://172.23.0.4:2380 clientURLs=https://172.23.0.4:2379 isLeader=true
a423b0b54377c79f: name=master3.openshift35.local peerURLs=https://172.23.0.6:2380 clientURLs=https://172.23.0.6:2379 isLeader=false
b5a071be696c6070: name=master2.openshift35.local peerURLs=https://172.23.0.5:2380 clientURLs=https://172.23.0.5:2379 isLeader=false