Loading video player...
๐ฆ Longhorn Architecture โ Complete Overview & How to Learn and Contribute This video provides a high-level yet practical overview of Longhorn, the CNCF-backed cloud-native distributed block storage system for Kubernetes. We walk through Longhorn architecture, core components, and key concepts to help you understand how persistent storage works internally in Kubernetes environments. Whether youโre a Kubernetes administrator, platform engineer, SRE, or storage enthusiast, this video will help you build a solid mental model of Longhorn and how it integrates with Kubernetes. ๐ What Youโll Learn in This Video What Longhorn is and why itโs used in Kubernetes Longhorn architecture and internal components How volumes, replicas, and engines work together Backup and DR ๐งฑ Longhorn Architecture โ Key Components Explained Longhorn Architecture The overall structure of Longhorn consists of: โ Longhorn Manager โ Instance Manager โ Engine These components collectively manage persistent storage in Kubernetes. Longhorn Manager - Central control plane component - Orchestrates volume lifecycle (create, delete, attach, detach) - Manages engines and instance managers - Interacts with Kubernetes and CSI - Stateless, relies on CRDs stored in etcd Instance Manager - Runs as a pod on each node - Manages engine and replica processes - Handles I/O control, monitoring, and process lifecycle Engine - Core component responsible for volume I/O - Each volume has one active engine at a time Replica - A copy of volume data - Distributed across nodes for redundancy and fault tolerance ๐ Glossary of Key Terms CRDs (Custom Resource Definitions) โ Used by Longhorn to store volumes, replicas, snapshots, and settings etcd โ Stores Kubernetes and Longhorn CRD state CSI (Container Storage Interface) โ How Longhorn exposes storage to Kubernetes PVC & PV โ Persistent Volume Claims and Persistent Volumes RWO & RWX โ ReadWriteOnce vs ReadWriteMany access modes Share Manager โ Enables RWX using NFS Volume Attachmentโ The process by which a Longhorn volume is connected to a specific node and made available for use by a pod. Volume Detachment โ The process of disconnecting a Longhorn volume from a node. Force Detach โ A manual operation in Longhorn to forcefully detach a volume, often used when automatic detachment fails or a node is permanently lost. Volume Attachment Deletion โ A troubleshooting step to resolve persistent attachment issues by manually deleting the stale volume attachment entry. PVC (Persistent Volume Claim) โ A Kubernetes API object that requests a certain amount of storage from a Persistent Volume (PV). PV (Persistent Volume) โ A Kubernetes API object that represents a piece of storage in the cluster, provisioned by Longhorn for use by PVCs. Read Write Once (RWO) โ A volume access mode where the volume can be mounted as read-write by a single node. Read Write Many (RWX) โ A volume access mode where the volume can be mounted as read-write by multiple nodes simultaneously, typically using a share manager and NFS. Share Manager โ A Longhorn component used to enable RWX functionality by presenting RWO volumes via NFS to multiple nodes. Volume Expansion โ The process of increasing the size of an existing Longhorn volume. Volume Shrinking โ The process of decreasing the size of a Longhorn volume. This is generally cautioned against due to potential metadata corruption and data loss. Degraded State โ The status of a Longhorn volume when one or more of its replicas are unavailable or unhealthy, but the volume can still serve I/O. Faulted State โ A more severe state than degraded, where a volume is significantly impaired, potentially due to multiple replica failures or other critical issues. Auto Salvage โ A Longhorn feature that attempts to automatically recover faulted volumes or replicas. Metadata โ Data that describes other data. In Longhorn, metadata about volumes and their replicas is crucial for their proper functioning and recovery. /var/lib/longhorn โ The directory path on a node where Longhorn stores volume data, metadata, and configuration files. ๐ฑ Learn More & Contribute to Longhorn Longhorn is an open-source project, and the community is very welcoming. If you want to learn deeper or contribute, check out the links below ๐ ๐ Longhorn Community https://longhorn.io/community/ ๐ Official Documentation https://longhorn.io/docs/ ๐ง Knowledge Base Articles https://longhorn.io/kb/ ๐ Who This Video Is For Kubernetes Administrators Platform & Cloud Engineers SREs & DevOps Engineers Rancher & RKE2 users Anyone preparing for Kubernetes or storage deep dives ๐ If you found this helpful, like the video, subscribe, and share with your Kubernetes friends! Drop your questions or topics you want covered next in the comments ๐ฌ Happy learning & happy hacking with Kubernetes and Longhorn! ๐ฎ๐ฆ