Longhorn: a game changer in the distributed block storage

Search for a command to run...

No comments yet. Be the first to comment.
Summary Based on the Cloud Adoption Framework (CAF) and Well-Architected Framework (WAF), this project automates the audit of an entire Azure tenant in minutes, using AI and a sovereign environment to

Summary The N1 agent transforms how DevOps teams interact with Kubernetes infrastructures by combining conversational prompts and advanced automation, all powered by artificial intelligence. Concretel

We had the opportunity to attend Kubernetes Community Days (KCD) Suisse Romande, held at CERN in Geneva, on December 4th and 5th. These two days were full of discussions, workshops (we had the opportunity to participate to the Exoscale capture the fl...

With the recent annoncements regarding the Gateway APIs and the end of the Ingress Nginx maintenance, some aspects (historically managed by the Ingress Nginx) need to be re-adapted, we’ll shre one of those today: the TLS certificates management throu...

The CNCF has recently announced a major transition: Ingress Nginx, the “de facto” considered ingress controller, will officially reach end-of-life in March 2026. Official source here : https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/#:...

During te last Kubecon in Paris, David Ko of SUSE presented us Longhorn, a distributed block storage solution, highlighting its latest features and teasing the upcoming version 2.0 of the product.
Longhorn implements distributed block storage using containers and microservice (source : gitlab)
Longhorn, stands out as a "cloud agnostic" storage solution, free from reliance on any specific cloud provider, marking a significant advantage in today's diverse cloud landscape. This is part of the CNCF since 2019.
Longhorn's foundation stands on four key pillars:
Reliability: Longhorn uses a robust system for data recovery in the event of crashes or data loss. It facilitates easy snapshots and backups, ensuring data integrity and minimizing downtime.
Usability: With its straightforward installation process and intuitive user experience, Longhorn prioritizes usability, making it accessible even to less tech-users.
Performance: Longhorn delivers great performance, meeting the demands of modern workloads without compromising efficiency.
Maintenance Reliability: Longhorn allows for seamless node upgrades without disrupting ongoing workloads, ensuring continuous operation during maintenance activities.
The widespread adoption of Longhorn is evident, with over 111,000 clusters currently using this solution. The project's exponential growth is evidenced by the increasing contribution number on GitHub.
https://github.com/longhorn/longhorn
Support for PVC Volumes and CSI: Longhorn seamlessly integrates with Kubernetes Persistent Volume Claims (PVC) and Container Storage Interface (CSI), enhancing its compatibility and flexibility.
Data Management: Longhorn offers thin provisioning, snapshots, live upgrades, and migration capabilities, that help users with efficient data management solutions.
Longhorn is composed of 2 essential aspects :
Control Plane: Longhorn's control plane, managed via daemon sets, uses controllers and Custom Resources (CRs) to provide essential management functions.
Data Plane: The data plane handles iSCSI and various volume types (local or raw block devices), in parallel with replica management, to provide data availability and redundancy.
Longhorn uses progressive snapshots, those snapshots countain only the changed blocks since the last snapshot. This approach helps to recuce storage utilization by focusing on data changes only, without unnecessary use of huge snapshots.
Replica Rebuilding Process:
In the event of replica loss, Longhorn executes the following steps:
Pause the engine (only the replica controller) while retaining read/write capabilities.
Take a snapshot.
Add a new replica in write-once mode.
Restart the engine.
Synchronize volumes and snapshots.
Change the new replica to read/write mode.
Version 1.6 introduces the Share Manager feature that enables multiple instances of Longhorn to use the same volume concurrently, boosting resource utilization and collaboration.
The installation on any K8s cluster is fast. We just need to get the file and apply it
kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v1.X.X/deploy/longhorn.yaml
Once it's created, wait a moment until all longhorn-system pods are ready

In order to access to the ui, just forward the port
kubectl port-forward deployment/longhorn-ui 7000:8000 -n longhorn-systemhttp://127.0.0.1:7000/#/
In the UI, you'll see the different volumes, replicas and you'll have access to the configurations.

Next, create the secret to provide the storage access secrets
kubectl create secret generic longhorn-s3 --from-literal=AWS_ACCESS_KEY_ID=************* -n longhorn-system
--from-literal=AWS_SECRET_ACCESS_KEY=************** -n longhorn-system
Now, we can create any pv/pvc using longhorn :
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-pvc
namespace: namespace1
annotations:
volume.beta.kubernetes.io/storage-provisioner: driver.longhorn.io
volume.kubernetes.io/storage-provisioner: driver.longhorn.io
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
volumeName: pvc-xxx
storageClassName: longhorn
volumeMode: Filesystem
Longhorn emerges as a game-changer in the storage landscape, with performance, and ease of use. With its innovative features and robust architecture, Longhorn is on the way to redefine storage solutions for modern cloud environments.