Skip to main content

etcd member 제외 방법

kuebernetes DB격인 etcd의 member리스트를 제외한느 절차를 기술한다.
다중 마스터(3대로 구현)되어 있을때 특정 노드를 제외하는 방법이다.

 

  1. etcd memver list 확인
    $> cd /usr/local/bin
    $> ./etcdctl.sh -w table endpoint status --cluter=true
    +----------------------+------+---------+----------+-----------+------------+------------+------------+--------------------+--------|
    |       ENDPOINT       |  ID  | VERSION |  DB SIZE | IS LEADER | IS LEARNER | RAFT TERM  | RAFT INDEX | RAFT APPLIED INDEX | ERRORS |
    +----------------------+------+---------+----------+-----------+------------+------------+------------+--------------------+--------|
    | https://1.2.3.4:2379 | abcd | 3.4.13  |    11 MB | true      | false      | 16         |    2607488 |            2607488 |        |
    | https://5.6.7.8:2379 | efgh | 3.4.13  |    11 MB | false     | false      | 16         |    2607488 |            2607488 |        |
    | https://9.8.7.6:2379 | ijkl | 3.4.13  |    11 MB | false     | false      | 16         |    2607488 |            2607488 |        |
    +----------------------+------+---------+----------+-----------+------------+------------+------------+--------------------+--------|

  2. 제외할 인스턴스 ID입력
    $> ./etcdctl.sh  member remove efgh
    Memeber efgh removed from cluster 1234

  3. 제외상태 확인
    $> cd /usr/local/bin
    $> ./etcdctl.sh -w table endpoint status --cluter=true
    +----------------------+------+---------+----------+-----------+------------+------------+------------+--------------------+--------|
    |       ENDPOINT       |  ID  | VERSION |  DB SIZE | IS LEADER | IS LEARNER | RAFT TERM  | RAFT INDEX | RAFT APPLIED INDEX | ERRORS |
    +----------------------+------+---------+----------+-----------+------------+------------+------------+--------------------+--------|
    | https://1.2.3.4:2379 | abcd | 3.4.13  |    11 MB | true      | false      | 16         |    2607488 |            2607488 |        |
    | https://9.8.7.6:2379 | ijkl | 3.4.13  |    11 MB | false     | false      | 16         |    2607488 |            2607488 |        |
    +----------------------+------+---------+----------+-----------+------------+------------+------------+--------------------+--------|