zoukankan      html  css  js  c++  java
  • etcd查看leader节点

    etcd查看集群leader的节点


    1. 安装etcdctl
    2. 具体命令如下
      <root@SYS-OPS-ETCD01 ~># etcdctl -w table --cert /etc/kubernetes/pki/etcd/peer.crt --key /etc/kubernetes/pki/etcd/peer.key --cacert /etc/kubernetes/pki/etcd/ca.crt --endpoints https://10.1.0.182:2379 endpoint status --cluster
      +-------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
      |        ENDPOINT         |        ID        | VERSION | DB SIZE | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS |
      +-------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
      | https://10.1.0.181:2379 | 2c8cf085f70a48f7 |   3.4.3 |  413 MB |     false |      false |        68 | 4106191951 |         4106191951 |        |
      | https://10.1.0.180:2379 | 6d8112d8e415d2b5 |   3.4.3 |  413 MB |     false |      false |        68 | 4106191955 |         4106191954 |        |
      | https://10.1.0.182:2379 | a8a882b8d519b039 |   3.4.3 |  413 MB |      true |      false |        68 | 4106191957 |         4106191957 |        |
      +-------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
    3. 查看节点列表
      <root@SYS-OPS-ETCD01 ~># etcdctl -w table --cert /etc/kubernetes/pki/etcd/peer.crt --key /etc/kubernetes/pki/etcd/peer.key --cacert /etc/kubernetes/pki/etcd/ca.crt --endpoints https://10.1.0.182:2379 member list
      +------------------+---------+--------+-------------------------+-------------------------+------------+
      |        ID        | STATUS  |  NAME  |       PEER ADDRS        |      CLIENT ADDRS       | IS LEARNER |
      +------------------+---------+--------+-------------------------+-------------------------+------------+
      | 2c8cf085f70a48f7 | started | infra1 | https://10.1.0.181:2380 | https://10.1.0.181:2379 |      false |
      | 6d8112d8e415d2b5 | started | infra0 | https://10.1.0.180:2380 | https://10.1.0.180:2379 |      false |
      | a8a882b8d519b039 | started | infra2 | https://10.1.0.182:2380 | https://10.1.0.182:2379 |      false |
      +------------------+---------+--------+-------------------------+-------------------------+------------+
  • 相关阅读:
    php __clone实现
    php 魔术方法 __autoload()
    ubuntu 下telnet 操纵memcache 实现
    ubuntu下 使用AB做压力测试
    github 使用方法总结 还有一部分不太懂
    ubuntu 下 github 使用方法 以及异常修改
    ubuntu 14.0 下github 配置
    postgres安装 以及修改postgres 密码
    ubuntu 14.下 netbeans 自体锯齿 消除
    js实现多张图片每隔一秒换一张图片
  • 原文地址:https://www.cnblogs.com/apink/p/15683226.html
Copyright © 2011-2022 走看看