<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>etcd on Alekc's Blog</title><link>https://blog.alekc.org/tags/etcd/</link><description>Recent content in etcd on Alekc's Blog</description><generator>Hugo -- gohugo.io</generator><copyright>©{year}, All Rights Reserved</copyright><lastBuildDate>Sat, 03 Sep 2022 23:00:00 +0000</lastBuildDate><atom:link href="https://blog.alekc.org/tags/etcd/index.xml" rel="self" type="application/rss+xml"/><item><title>Fixing etcdDatabaseHighFragmentationRatio prometheus alert</title><link>https://blog.alekc.org/posts/fixing-etcddatabasehighfragmentationratio-prometheus-alert/</link><pubDate>Sat, 03 Sep 2022 23:00:00 +0000</pubDate><guid>https://blog.alekc.org/posts/fixing-etcddatabasehighfragmentationratio-prometheus-alert/</guid><description>If you receive a following error in alertmanager
1etcd cluster &amp;#34;kube-etcd&amp;#34;: database size in use on instance xxx.xxx.xxx.xxx:2381 2is 49.55% of the actual allocated disk space, please run defragmentation 3(e.g. etcdctl defrag) to retrieve the unused fragmented disk space. it can be easily solved by running a following command:
1kubectl exec $(kubectl get pods --selector=component=etcd -A -o name \ 2| head -n 1) -n kube-system -- etcdctl defrag --cluster \ 3--cacert /etc/kubernetes/pki/etcd/ca.</description></item><item><title>Recovery of etcd failing node</title><link>https://blog.alekc.org/posts/2021/recovery-of-etcd-failing-node/</link><pubDate>Thu, 14 Jan 2021 16:40:59 +0000</pubDate><guid>https://blog.alekc.org/posts/2021/recovery-of-etcd-failing-node/</guid><description>&lt;p>One of my etcd nodes in my home k8s cluster has been failing with following message:&lt;/p>
&lt;div class="highlight">&lt;pre class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="ln">1&lt;/span>2021-01-14 11:16:09.233458 I | embed: listening for peers on 192.168.0.33:2380
&lt;span class="ln">2&lt;/span>raft2021/01/14 11:16:09 tocommit(29492601) is out of range [lastIndex(29492469)]. Was the raft log corrupted, truncated, or lost?
&lt;span class="ln">3&lt;/span>panic: tocommit(29492601) is out of range [lastIndex(29492469)]. Was the raft log corrupted, truncated, or lost?
&lt;/code>&lt;/pre>&lt;/div>&lt;p>These are steps I took to fix it:&lt;/p></description></item></channel></rss>