Longhorn Fs
You set up a longhorn fs volume by defining a block storage claim in Kubernetes. The storage engine then formats the block device and mounts the file system to your pod. Platform teams often use broad cluster roles to speed up this storage setup. Overly broad roles let any user or app read, change, or delete mounted volumes. How a longhorn fs architecture works in Kubernetes Longhorn builds distributed block storage using local disks across your cluster nodes. When an app asks for storage, th
Fs: the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You set up a longhorn fs volume by defining a block storage claim in Kubernetes. The storage engine then formats the block device and mounts the file system to your pod. Platform teams often use broad cluster roles to speed up this storage setup. Overly broad roles let any user or app read, change, or delete mounted volumes.
How a longhorn fs architecture works in Kubernetes
Longhorn builds distributed block storage using local disks across your cluster nodes. When an app asks for storage, the control plane creates a dedicated engine for that volume. That engine writes copies of the data to multiple node disks at once. The node then formats the raw block device with a standard Linux file system.
Your pod mounts that formatted longhorn fs directory just like a local folder. Kubernetes role-based rules decide which users and service accounts can create or attach volumes. Admins bind these roles to specific namespaces to separate team workloads. If a node fails, the controller attaches a healthy replica to the new pod.
Storage admins also manage volume snapshots and remote backups through the storage control plane. Access to this dashboard or API relies on standard cluster credentials and role bindings. Teams must Scope these roles carefully so one app cannot mount another team's disk.
What native storage roles solve and what they miss
Native Kubernetes roles control who can create, attach, or delete a storage volume. They stop unauthorized service accounts from mounting disks that belong to other namespaces. They also control who can trigger snapshots or restore volumes from backup storage. This setup solves the basic boundary problem at the cluster level.
Still, cluster roles only decide who logs in and attaches a disk. They do not inspect what individual commands or scripts do inside a running pod. Once an engineer opens a shell to debug a mounted volume, native roles step back. The user has full file access to read or wipe every file on that disk.
A broad debugging role can expose sensitive customer files stored on the volume. Standard storage logs show that a volume was mounted to a specific node. They do not record which shell commands a developer ran against the mounted directory. Teams need a way to govern live sessions without handing out permanent cluster keys.
Fs: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Managing live maintenance on mounted volumes
Engineers often need to check disk usage, fix file permissions, or inspect corrupted data. Giving every developer full cluster admin rights creates a major security risk. Shared static kubeconfigs make it impossible to tell which person ran a destructive command.
A better workflow separates cluster setup from day-to-day volume maintenance tasks. Teams should restrict direct node logins and limit who can exec into storage pods. Every maintenance action on a mounted disk should tie back to an individual user identity. Approvals for sensitive storage checks should happen per task rather than through permanent role grants.
When teams audit every command run during a live session, compliance reviews get much faster. Masking rules can also rewrite sensitive fields like emails or card numbers in command output. This keeps private data safe while engineers fix file system errors in production.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
What file systems can a longhorn fs volume use?
The storage driver formats block volumes using standard Linux file systems supported by your host nodes. You define the desired file system type inside your Kubernetes storage class before creating claims.
Can multiple pods write to the same volume at once?
Standard block volumes attach to a single node for read and write operations. For shared access across nodes, the storage system provides a built-in network file share manager.
How do teams audit file changes inside a mounted volume?
Kubernetes logs only track when a volume is created, attached, or detached from a pod. To track human maintenance commands, teams must record shell actions at the session entry point.
Related guides
In this post