How Can I Check The Current Disk Space Consumption By ETCD Database?

Problem

  • How can I check how much disk space is consumed by the ETCD database on the kubernetes cluster node?

Environment

  • Platform9 Managed Kubernetes - All Versions

  • ETCD

Answer

  • The current ETCD Database size can be checked using the command mentioned below.

  • The value under the DB SIZE column indicates the size of the ETCD database for the particular cluster node.

# ETCDCTL_API=3 /opt/pf9/pf9-kube/bin/etcdctl endpoint status --cluster --write-out=table --endpoints=http://127.0.0.1:2379 --cacert="/etc/pf9/kube.d/certs/etcdctl/etcd/ca.crt" --cert="/etc/pf9/kube.d/certs/etcdctl/etcd/request.crt" --key="/etc/pf9/kube.d/certs/etcdctl/etcd/request.key"
+-----------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
|          ENDPOINT           |        ID        | VERSION | DB SIZE | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS |
+-----------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
|   https://10.128.144.8:4001 | 767cdb8760094d16 |  3.4.18 |   17 MB |      true |      false |       220 |   25747862 |           25747862 |        |
| https://10.128.145.228:4001 | 9ace043310f70c08 |  3.4.18 |   17 MB |     false |      false |       220 |   25747862 |           25747862 |        |
|  https://10.128.145.23:4001 | af4d27825edb26b4 |  3.4.18 |   17 MB |     false |      false |       220 |   25747862 |           25747862 |        |
+-----------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
  • The other command mentioned below provides the actual on disk size of the ETCD DB from Operating System Perspective. It can be considered as the way to confirm if the value mentioned under the DB SIZE column is correct or not.

Additional Information

Last updated