<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Luks on johanneskueber.com</title><link>https://johanneskueber.com/tags/luks/</link><description>Recent content in Luks 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/luks/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></channel></rss>