Skip to content

Simple cronjob for defragmentation of etcd instances.

Notifications You must be signed in to change notification settings

ugur99/etcd-defrag-cronjob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

etcd defragmantation cronjob

Docker Build

This is a simple cronjob checks whether the etcdDatabaseHighFragmentationRatio alert is active for the cluster or not; if it is active, then it runs etcdctl defrag command for each etcd instances starting from the ones that are not leader.

Some Notes

  • Version of etcdctl is 3.5.3
  • Prometheus service and its namespace should be set as an environment variable on the cronjob.yml.
  • A secret object in which the etcd client certs and CA should exist.
  • An endpoint object consisting of etcd endpoints.

References and Useful Discussions