Volume Encryption #448
-
Discussed in #287Originally posted by JustinGuese August 29, 2022 |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 11 replies
-
@JustinGuese, I will address this ASAP. |
Beta Was this translation helpful? Give feedback.
-
@JustinGuese We very recently added support for Longhorn volumes and a custom values.yaml file to be added, please see the kube.tf.example. And this is the how to add encryption, which is probably already possible now that you have complete flexibility over Longhorn's config. Please try it, and let me know if all is good so we can close this! |
Beta Was this translation helpful? Give feedback.
-
I will consider this resolved, but if you tried and it turned out not possible because we are missing something, just let me know, and we will reopen this. |
Beta Was this translation helpful? Give feedback.
-
@mysticaltech did you have a thought about making this feature donatable? also: I'm currently stuck at that the nodes need some libraries installed for longhorn and the encryption to work...
Thanks again for your help! |
Beta Was this translation helpful? Give feedback.
-
@JustinGuese We basically just install Longhorn for you, but then up to you to configure it. However, please have a look at this guide by @ifeulner, it touches on a lot of good subjects about how to use Longhorn optimally: https://gist.github.com/ifeulner/d311b2868f6c00e649f33a72166c2e5b To install additional packages, you can use the Then you to apply to terraform again and add an ideally creating new agent nodepools that will mirror your old nodepools. This will temporarily double the size of your cluster. But then you can decommission the old nodes draining them all and then changing their (old) nodepool count to 0 (don't delete them). This method is explained better in the readme. However, before doing all of this, you better ssh into a node and try to install the above packages manually via |
Beta Was this translation helpful? Give feedback.
-
i don't want to be annoying, but maybe someone already did this? using the "default" longhorn volume everything works, but as soon as I create an encrypted storageclass as stated in their doc, it fails to mount that volume. it does not throw an error, and I think the issue is specific to microos, so I guess it must be some permission error, or a missing library in microos? anyone experienced something similar? |
Beta Was this translation helpful? Give feedback.
-
Haven't used encrypted volumes yet, but currently the default install is lacking at least |
Beta Was this translation helpful? Give feedback.
-
Okay I got it to work, some findings from my journey: (preferred) hcloud csi encrypted volumesThe easiest way to get encrypted volumes working is actually to use the new encryption functionality of hcloud csi itself, see https://github.com/hetznercloud/csi-driver.
and to create a new storage class
in addition, you nodes need to have the package If you want to check if the encryption really works (which I can confirm), you can mount the volume using the hetzner console, and then open it with (not working) longhorn encryptionI tried this, but it did not work for me. For this, you need to install the
there seems to be a problem though, as somehow this volume will not get mounted on the node. Anyways, the hetzner volume csi way is better anyways |
Beta Was this translation helpful? Give feedback.
-
I may have nailed it. #638 |
Beta Was this translation helpful? Give feedback.
Okay I got it to work, some findings from my journey:
(preferred) hcloud csi encrypted volumes
The easiest way to get encrypted volumes working is actually to use the new encryption functionality of hcloud csi itself, see https://github.com/hetznercloud/csi-driver.
For this, you just need to create a secret containing the encryption key
and to create a new storage class