How to remove dead etcd node from etcd cluster

Introduction In my kubernetes cluster I 6 nodes - 5 virtual machines and one physical. The physical node was the remaining master/control-plane node from when my cluster was running on physical machines. I wanted to shut down the remaning physical machine so I could save a little power (very little, since the wyse machines uses around 10-15 w when idle). But I also wanted it to be removed, so my entire cluster was running on my proxmox cluster that also hosts the ceph cluster - so everything is contained on the 5 physical machines that runs proxmox & ceph.
Read More…

How to use mimir as a remote storage for prometeus

Introduction In my kubernetes cluster I am running Prometheus as my time series storage for the metrics that servers & services create, ceph is one example of this. Earlier today I wanted to look into historical stats, but found out that prometheus by default truncates data after 14 days. This is done because its optimized for short time periods, so I did not want to tweak the configuration to enable it to store data for longer times.
Read More…

Upgrade metallb load balancer from 0.12.x to 0.13.x

Introduction I am running a kubernetes cluster at home to have resiliences for my “homeprod”. This kubernetes cluster us using metallb to provide loadbalancing, so I can have many pods exposed as a single IP to my local network. Unfortunately the version I installed in 2022 almost a year ago is using a deprecated feature PodSecurityPolicy when I noticed this I have started to upgrade the stuff I use to newer versions that uses the new way to handle this security.
Read More…

Enable and mount cephfs with ansible

Introduction When having multiple servers you have to do the same thing on its nice with automation - luckily you dont have to invent the wheel yourself. I decided to use ansible to enable cephfs on all my kubernetes nodes. This is a simple playbook that can be used by others if required. Assumptions To use the playbook verbatim you have to have a working ceph.conf and a working keyring for your user located in the same directoy as the ansible play book.
Read More…

Using cephfs with kubernetes

Introduction When having a kubernetes cluster running like I do, it is also nice to have a scalable and resilient filesystem where your nodes can share configuration files or other read only data. Previously I had my cluster pods mount a nfs share inside the pods, but since this is a single point of failure I wanted to move to a distributed filesystem and since I recently installed a ceph cluster for VM storage I decided to also leverage the cephfs filesystem instead of NFS.
Read More…

.NET ZFS REST API

Introduction ZFS is a highly scalable and resilient filesystem and many people use it as part of NAS systems like TrueNAS, napp-it and many others. These NAS systems usually have a UI to manage ZFS and thats great - but if you want to install ZFS on a linux server and do not want a full blown NAS solution, then it gets tricky, since you cannot just install a UI to manage your ZFS installation.
Read More…

How to use [InternalsVisibleTo] attribute in .NET SDK projects

Introduction Often you want to test internal methods of a class library you are using - this could be because you have internal helper methods that you would like to test in isolation, i.e. proper unit tests. Before .NET SDK project type was introduced the way to do this was to add a line to the AssemblyInfo.cs file: [assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("MyLibrary.Tests")] This would allow your MyLibrary.Tests project to see and access internal methods/properties etc.
Read More…

dnsmasq PXE Server setup on Rocky Linux 8.5

Introduction When installing many machines - that being bare-metal or virtual machines - automation comes to mind - and to that PXE booting and installing via the network is awesome. This requires that you have a PXE server configured and configuration files on that server that tells clients how to install. I am using dnsmasq, which is an awesome piece of software that also is running as a DHCP server on my network.
Read More…

.NET decimal serialization with protobuf

Introduction When working with .NET and financial data, then its very common that the decimal type is used, since it is precise and does not lose information when you do calculations. i.e. take the following code: var x = 3.999999999999999d; Console.WriteLine(x); var result = x+x; Console.WriteLine(result); You would assume the result would be 7.999999999999998 - but in fact it will print out 4 - which for all intends and purposes is okay for most usages - but if you require precision on all decimal places, double is not good enough because the datatype cannot represent the precision correctly.
Read More…

Script to migrate VMWare ESXi Virtual machine to Proxmox VE 7.1

Introduction Migrating virtual machines between platforms can be a pain in the ass to put it mildly. I have recently decided to migrate from ESXi to Proxmox VE, simply because it allows me downscale my lab from several “BIG” machines into a single machine. When converting a lot of VM’s from ESXi to Proxmox VE I basically had to write the same commands over and over in the same sequence.
Read More…