<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Encryption on johanneskueber.com</title><link>https://johanneskueber.com/tags/encryption/</link><description>Recent content in Encryption on johanneskueber.com</description><generator>Hugo</generator><language>en_US</language><lastBuildDate>Thu, 28 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://johanneskueber.com/tags/encryption/index.xml" rel="self" type="application/rss+xml"/><item><title>Per-PVC Encryption with Longhorn and CSI Secret Templates</title><link>https://johanneskueber.com/posts/2026-05-28-longhorn-per-pvc-encryption/</link><pubDate>Thu, 28 May 2026 00:00:00 +0000</pubDate><guid>https://johanneskueber.com/posts/2026-05-28-longhorn-per-pvc-encryption/</guid><description>&lt;p&gt;This article documents how to configure a Longhorn &lt;code&gt;StorageClass&lt;/code&gt; that encrypts every PVC with its own per-volume key, derived through CSI&amp;rsquo;s secret-template parameters, and how to provision the matching secrets so the keys are scoped to the application namespace.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="1-what-encryption-longhorn-actually-does"&gt;1. What encryption Longhorn actually does&lt;/h2&gt;
&lt;p&gt;Longhorn 1.4+ supports LUKS encryption at the block device layer. When a PVC&amp;rsquo;s StorageClass declares &lt;code&gt;encrypted: &amp;quot;true&amp;quot;&lt;/code&gt;, Longhorn calls &lt;code&gt;cryptsetup luksFormat&lt;/code&gt; on the underlying replica devices using a passphrase pulled from a Kubernetes Secret. The PVC is then exposed to the consuming Pod as an unencrypted filesystem — the kernel handles the encryption transparently through the device-mapper layer.&lt;/p&gt;</description></item><item><title>Use Longhorn with Talos 1.10 and userVolumes</title><link>https://johanneskueber.com/posts/2025-06-17-longhorn-uservolumes-talos/</link><pubDate>Tue, 17 Jun 2025 07:06:26 +0000</pubDate><guid>https://johanneskueber.com/posts/2025-06-17-longhorn-uservolumes-talos/</guid><description>&lt;p&gt;When building a cluster, especially in a homelab, local storage is needed for application data. Especially for databases fast read and write is required. Offloading the workload to a NAS most of the time is slower. The solution I use is to provision on-node storage with &lt;a href="https://longhorn.io/"&gt;Longhorn&lt;/a&gt;. Longhorn acts as a CSI and offers on-node storage, replication, backups and more.&lt;/p&gt;
&lt;p&gt;As I am currently building a Talos cluster I need to integrate the longhorn CSI into the setup. This is not as straigt forward as with K3s oder K8s, as Talos has tighter security constraints and also needs additional plugins to handle SCSI - the underlying file system protocol used by longhorn. On top I am using &lt;a href="https://budimanjojo.github.io/talhelper/latest/"&gt;Talhelper&lt;/a&gt; to allow a GitOps style usage of talosctl. The main advantage is the encryption of secrets used by talos config files with &lt;a href="https://github.com/getsops/sops"&gt;SOPS&lt;/a&gt; - something that I already use for Tofu and fluxCD.&lt;/p&gt;</description></item></channel></rss>