Etcdctl: Difference between revisions
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
--key-file /etc/origin/master/master.etcd-client.key \ | --key-file /etc/origin/master/master.etcd-client.key \ | ||
member list | member list | ||
=Commands= | |||
==cluster-health== | |||
From the node that runs etcd, as root: | |||
<pre> | |||
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 | |||
</pre> | |||
Output sample: | |||
<pre> | |||
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 | |||
</pre> | |||
In case an error message similar to | |||
error #0: x509: certificate is valid for master1, not master1.local | |||
is generate, adjust the host names accordingly. | |||
==member== | |||
===list=== | |||
<pre> | |||
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 | |||
</pre> | |||
Output sample: | |||
<pre> | |||
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 | |||
</pre> |
Revision as of 23:50, 4 July 2017
Internal
Overview
etcdctl -C https://master1:2379,https://master2:2379,https://master3: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
Commands
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
In case an error message similar to
error #0: x509: certificate is valid for master1, not master1.local
is generate, adjust the host names accordingly.
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